Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class App {
- public static void main(String args[]) {
- Scanner in = new Scanner(System.in);
- int a, b;
- System.out.print("Введите значение первой переменной: ");
- a = in.nextInt();
- System.out.print("Введите значение второй переменной: ");
- b = in.nextInt();
- int c = a;
- a = b;
- b = c;
- System.out.println("Теперь значение первой переменной: " + a);
- System.out.println("Теперь значение второй переменной: " + b);
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement