import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Введите число: \nА = ");
int x, y = sc.nextInt();
sc.close();
x = y * y;
System.out.println("A^2 = " + x);
y *= x;
System.out.println("A^3 = " + y);
x *= y;
System.out.println("A^5 = " + x);
y = x * x;
System.out.println("A^10 = " + y);
System.out.println("A^15 = " + y);
}
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Введите число: \nА = ");
int x, y = sc.nextInt();
sc.close();
x = y * y;
System.out.println("A^2 = " + x);
y *= x;
System.out.println("A^3 = " + y);
x *= y;
System.out.println("A^5 = " + x);
y = x * x;
System.out.println("A^10 = " + y);
y *= x;
System.out.println("A^15 = " + y);
}
}