Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //w.a.p. which swap two value give by user.
- /*
- After swapping(original value)
- a=10
- b=20
- before swapping
- a=20
- b=10
- */
- #include<stdio.h>
- #include<conio.h>
- int main()
- {
- int no1,no2,temp;//variable declaration
- printf("\nEnter No 1=");
- scanf("%d",&no1);
- printf("\nEnter No 2=");
- scanf("%d",&no2);
- printf("\n Before Swapping value of no1 and no2 is %d and %d",no1,no2);
- temp=no2;
- no2=no1;
- no1=temp;
- printf("\n After Swapping value of no1 and no2 is %d and %d",no1,no2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment