Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- System.out.print("Введите n: ");
- int n = in.nextInt();
- System.out.print("Введите m: ");
- int m = in.nextInt();
- int x = 0, temp = 1;
- for (int i = 1; i <= n; i++) {
- x += i - 5;
- temp *= i;
- }
- x += temp;
- temp = 1;
- for (int j = 1; j <= m; j++)
- temp *= (j * j + 1);
- x += temp;
- System.out.println("X = " + x);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment