You are on page 1of 1

Solution to Problem Set 1 Question No.

6 :
Program:
/* 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();
}

You might also like