|
|
вернуться в форумI USED JAVA LANGUAGE.WRONG ANSWER IN SECOND CASE???help me,pls! This is my code. import java.util.*; public class Main { public static void main(String args []){ Scanner in = new Scanner(System.in); double list[]=new double[4]; double a; for(int i=0;i<=3;i++){ a=in.nextDouble(); a=Math.sqrt(a); list[i]=a; } for(int j=3;j>=0;j--){ String text = String.format("%.4f",list[j]).replace(',', '.'); System.out.println(text); } } } It works correctly on my computer. But if I pass it there will be error in second case. Edited by author 09.05.2011 20:54 Edited by author 09.05.2011 20:55 Edited by author 09.05.2011 20:55 Re: I USED JAVA LANGUAGE.WRONG ANSWER IN SECOND CASE???help me,pls! Imagine, that second test contain more than 4 values ;) |
|
|