vstoyanov

Вход и изход от конзолата 4

May 14th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. import org.omg.CORBA.MARSHAL;
  2. import org.omg.Messaging.SYNC_WITH_TRANSPORT;
  3.  
  4. import java.lang.reflect.Array;
  5. import java.util.Scanner;
  6.  
  7. public class Main {
  8.  
  9.     public static void main(String[] args) {
  10.         Scanner scanner=new Scanner (System.in);
  11.                
  12.         int firstNum=Integer.parseInt(scanner.nextLine());
  13.         int secondNum=Integer.parseInt(scanner.nextLine());
  14.  
  15.         firstNum=firstNum-secondNum;
  16.         secondNum=firstNum+secondNum;
  17.         firstNum=secondNum-firstNum;
  18.  
  19.         System.out.println(firstNum);
  20.  
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment