Two numbers are input through the keyboard into two locations C and D. Write a program to interchange the contents of C and D.
void main()
{
 float c,d,e,f;
 printf("\nInput values of C and D");
 scanf("%f%f",&c,&d);
 e=c;
 f=d;
 c=f;
 d=e;
 printf("\nNow C is %f\nD is %f",c,d);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment