Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package e9.pkgfor;
- import java.util.Scanner;
- public class E9For {
- public static void main(String[] args) {
- int licznik=1, potega=1, x,n;
- Scanner sc = new Scanner(System.in);
- System.out.println("Wprowadź X");
- x = sc.nextInt();
- System.out.println("Wprowadź N");
- n = sc.nextInt();
- for (int i = 0; i <= n; i++) {
- potega *=x;
- licznik +=1;
- System.out.println(potega);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement