Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- void main()
- // Swap Numbers Using Temporary Variable
- {
- double a,b,temp;
- printf("Enter first number:\n");
- scanf("%lf",&a);
- printf("Enter second number:\n");
- scanf("%lf",&b);
- temp=a;
- a=b;
- b=temp;
- printf("After swapping, first Number: %.0lf\n",a);
- printf("After swapping, second Number: %.0lf",b);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement