// Write a c program to swap two number using third variable.
#include<stdio.h>
int main()
{
int a, b;
printf("Enter the value of a : ");
scanf("%d", &a);
printf("Enter the value of b : ");
scanf("%d", &b);
int temp;
temp = a;
a = b;
b = temp;
printf("The value of a is %d and b is %d", a, b);
return 0;
}
Comments
Oops!