Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Swap Numbers Using Temporary Variable*/
- #include<stdio.h>
- int main()
- {
- int num1;
- int num2;
- int temp;
- printf("Enter any two number:\n");
- scanf("%d %d", &num1, &num2);
- temp=num1;
- num1=num2;
- num2=temp;
- printf("num1:%d",num1);
- printf("num2:%d",num2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement