Sunday, October 31, 2010

Program to convert Celsius to Fahrenheit

 PROGRAM 4
#include<stdio.h>
#include<conio.h>

void main ()
{
  float c,f;
  clrscr ();
  printf ("Enter the value of celcius: ");
  scanf ("%f",&c);
  f=(float) 9/5*c+32;
  printf ("\nFahrenheit is %.2f",f);
  getch ();
}

OUTPUT


Enter the value of celcius: 24
Fahrenheit is 75.20

0 comments:

Post a Comment