Wednesday, 17 September 2014

Write a program to convert temperature farenheit into celcius.

SOURCE CODE

#include<stdio.h>
#include<conio.h>
void main()
{
    float c, f,i ;
   printf("CONVERTING FARENHEIT INTO CELCIUS\n\n") ;
   printf("Enter temperature in Farenheit : ") ;
   scanf("%f\a", &f) ;
   c=(f-32)*5/9 ;
   printf("\n\The temperature in celcius is : %f" , c ) ;
   for(i=0 ; i<10 ; i++)
   {
       printf("\a") ;
   } 
   getch() ;
}


SCREENSHOT

 

No comments:

Post a Comment