/* Swap the Value with the help of temporary variable*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b, temp;
printf("Enter First number in a = ");
scanf("%d",&a);
printf("Enter Second number in b = ");
scanf("%d",&b);
temp=a;
a=b;
b=temp;
printf("\nafter swaping the value of a = %d", a);
printf("\nafter swaping the value of b = %d", b);
getch();
}
Output:
No comments:
Post a Comment