Codex

Swap2

Jul 1st, 2011
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.25 KB | None | 0 0
  1. /*This program swaps two numbers and print them*/
  2. class Swap2
  3. {
  4.  void swapNumbers(int A,int B)
  5.   {
  6.      A=A+B;
  7.      B=A-B;
  8.      A=A-B;
  9.      System.out.println("A = "+A);
  10.      System.out.print("B = "+B);
  11.      System.out.println("Program over");
  12.   }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment