|  | 
|  | 
| back to board | Why Runtime error in Java? Posted by Azizbek  22 Oct 2020 22:08import java.util.Scanner;import java.math.RoundingMode;
 import java.text.DecimalFormat;
 public class Misol1001{
 public static void main(String[]args){
 Scanner i=new Scanner(System.in);
 DecimalFormat df = new DecimalFormat("#.####");
 df.setRoundingMode(RoundingMode.CEILING);
 int a=i.nextInt();
 long[] k=new long[a];
 for(int j=0; j<a; j++){
 k[j]=i.nextLong();
 }
 
 double[] l=new double[a];
 for(int c=0;c<a; c++){
 l[c]=Math.sqrt(k[c]);
 }
 for(int j=a-1; j>=0; j--){
 
 System.out.println(df.format(l[j]));
 }
 }
 }
 
 | 
 | 
|