Tuesday, 22 November 2011

Interchange Values of Two numbers Without using third variable

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter First number=");
scanf("%d",&a);
printf("Enter Second number=");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("a is=%d\n",a);
printf("b is=%d",b);
getch();
}
Earn upto Rs. 9,000 pm checking Emails. Join now!

No comments:

Post a Comment