computing-fundamentals
C programs and question bank.
Monday, November 1, 2010
swap two numbers -C
#include
#include
void main()
{
int a,b,t;
printf("enter the 2 values");
scanf("%d%d",&a,&b);
t = a;
a = b;
b = t;
printf("the swapped numbers are%d%d",a,b);
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment