SWAPPING OF TWO NUMBERS




SWAPPING OF TWO NUMBERS:
#include<studio.h>
#include<condo.h>
int main()
{
int a, b;
clrscr();
printf("ENTER TWO NUMBERS: \n");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("a=%d\n b=%d\n", a, b);
getch();
}
__________________________________________________________
Output:
ENTER TWO NUMBERS:13
                                            45
a=45
b=13



SWAPPING OF TWO NUMBERS SWAPPING OF TWO NUMBERS Reviewed by Amit Waghmare on October 07, 2018 Rating: 5

No comments: