C Programming
Temperature Converter
C programming for convert temperature from Celsius to Fahrenheit
By Geekboots
5/29/2018
0 views
temperature-converter.cC
#include<stdio.h>
int main() {
/* Declaration of float type variables */
float celsius, fahrenheit;
printf("Convert temperature from Celsius to Fahrenheit\n");
printf("Enter temperature in Celsius:\n");
scanf("%f", &celsius);
fahrenheit = (celsius * (9 / 5)) + 32;
/* Display float value upto 2 decimal point from a variable */
printf("Fahrenheit: %.2f degree\n", fahrenheit);
return 0;
}
/* Output */
Convert temperature from Celsius to Fahrenheit
Enter temperature in Celsius:
35
Fahrenheit: 67.00 degree
C programmingtemperature converterCelsius to Fahrenheit