public class BinSearch {
public static void main(String [] args)
{
double set[] = {-3,10,5,24,45.3,10.5};
double l = set.length;
double i, j, first, temp;
System.out.print("Before it can be searched, this set of numbers must be sorted: ");
for (i = l-1; i>0; i--)
{
first=0;
for(j=1; j
Подробнее здесь: [url]https://stackoverflow.com/questions/26413265/possible-lossy-conversion-from-double-to-int[/url]
Почему я получаю сообщение об ошибке «Возможно преобразование с потерями из double в int» и как это исправить?
[code]public class BinSearch { public static void main(String [] args) { double set[] = {-3,10,5,24,45.3,10.5}; double l = set.length; double i, j, first, temp; System.out.print("Before it can be searched, this set of numbers must be sorted: "); for (i = l-1; i>0; i--) { first=0; for(j=1; j