/*Serial No.21 [swami142.cpp]*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter the first no. a=");
scanf("%d",&a);
printf("Enter the second no. b=");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("After swaping numbers are:\na=%d\tb=%d",a,b);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter the first no. a=");
scanf("%d",&a);
printf("Enter the second no. b=");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("After swaping numbers are:\na=%d\tb=%d",a,b);
getch();
}
No comments:
Post a Comment
If you have any doubt, feel free to ask...