Thursday 21 May 2015

c program to Convert degrees into Fahrenheit’s and vice versa.

#include<stdio.h>
main()
{
int c,f;
float f1,c1;
clrscr();
printf("Enter the temperature in Celsius \n");
scanf("%d",&c);
f1=(c*1.8)+32;
printf("F= %f",f1);
printf("\nEnter the temperature in Fahrenheit\n");
scanf("%d",&f);
c1=(f-32)/1.8;
printf("C= %f",c1);
getch();
}

No comments:

Post a Comment