Advertisement
samrina_sarkar_7

Swap Numbers

Jun 20th, 2019
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int x,y,temp;
  5.     printf("Enter the value of x and y");
  6.     scanf("%d%d",&x,&y);
  7.     temp=x;
  8.     x=y;
  9.     y=temp;
  10.     printf("swapped:%d\n %d\n %d\n",temp,x,y);
  11.     return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement