ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

Help! В чём проблема? Java
Posted by qNkkkk 20 Sep 2017 02:09
import java.util.Scanner;

public class JavaApplication12 {

    public static void main(String[] args) {


    double x,k;
    int a;
    double y =Math.pow(10,18);


System.out.println("Сколько хотите ввести чисел ? ");
Scanner sc = new Scanner(System.in);
a = sc.nextInt();
int arr[] = new int[a];

for(int j=0;j<a;j++)
{

    do
{
        arr[j] =(int) sc.nextLong();
}

 while (arr[j]<0 || arr[j]>y);

}

for(int i=a-1;i>=0;i--)
{

    k = Math.sqrt(arr[i]);
    System.out.println(k);

}



  }
}
Re: Help! В чём проблема? Java
Posted by Mahilewets Nikita [BSUIR] 20 Sep 2017 21:57
>Сколько хотите ввести чисел?

)))))