24.12.19

Temperature value from centigrade to Fahrenheit prrogram in c

#include<stdio.h>
void main()
{
float cen,fah;
printf("Enter temperature in  centigrade scale:");
scanf("%f",&cen);

fah=9/5.0*cen+32;

printf("Equivalent Fahrenheit scale value is %f",fah);

}


OUTPUT:

Enter temperature in  centigrade scale: 27.5

Equivalent Fahrenheit scale value is 81.5

No comments:

Post a Comment

JAVA program pattern 2

import java.util.Scanner; public class pattern3 { public static void main(String args[]) { int i,j; Scanner sc=new Scanner(System.in); Syste...