C Language (Switching Values)
#include
#include
void main()
{
int a,b,c;
a=10;
b=25;
printf("\nThe Value of A is %d",a);
printf("\nThe Value of B is %d",b);
c=a;
a=b;
b=c;
printf("\nNow the Value of A is %d",a);
printf("\nNow the Value of B is %d",b) ;
getch();
}
#include
void main()
{
int a,b,c;
a=10;
b=25;
printf("\nThe Value of A is %d",a);
printf("\nThe Value of B is %d",b);
c=a;
a=b;
b=c;
printf("\nNow the Value of A is %d",a);
printf("\nNow the Value of B is %d",b) ;
getch();
}
Comments