Sunteți pe pagina 1din 1

/* Program to accept two values as inputs in two variables and swap them */

#include<stdio.h>
void main()
{
float a,b,temp;
clrscr();
printf("Enter two numbers:");
scanf("%f %f",&a,&b);
temp=a;
a=b;
b=temp;
printf("The numbers after swapping are:%f and %f",a,b);
getch();
}

S-ar putea să vă placă și