C Online Compiler
Example: C Program to Convert Celsius to Fahrenheit Temperature
C
C++
C#
Java
Python
PHP
main.c
STDIN
Run
// C Program to Convert Celsius to Fahrenheit Temperature #include <stdio.h> int main() { float c, f; // c - To stoer the celsius // f - To stoer the fahrenheit printf("Enter the temperature in Celsius::\n"); scanf("%f", &c); /* celsius to fahrenheit conversion formula */ f = (c * 9 / 5) + 32; // Final Output printf("\n%f Celsius = %f Fahrenheit\n", c, f); return 0; }
7
Output
Clear
ADVERTISEMENTS