WAP TO INPUT TWO
NO.S AND INTERCHANGE THEIR VALUE USING 3rd VARIABLE
#include<stdio.h>
#include<conio.h>
void main()
{
int num1;
int num2;
int num3;
clrscr();
printf("\nEnter 1st no.=");
scanf("%d",&num1);
printf("Enter 2nd no.=");
scanf("%d",&num2);
num3=num1;
num1=num2;
num2=num3;
printf("\nswapped value of
num1=%d",num1);
printf("\nswapped value of
num2=%d\n",num2);
getch();
}
No comments:
Post a Comment