Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package zajęcia2;
- import java.util.Scanner;
- public class Zad3 {
- public static void main(String[] args){
- Scanner wej = new Scanner(System.in);
- int liczba = wej.nextInt();
- wej.close();
- int potega = 1;
- while(true){
- if(potega*potega<=liczba){
- System.out.println(potega*potega);
- potega++;
- }
- else break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment