In this tutorial, we will learn the writing program in c to convert a given temperature from celsius to Fahrenheit. This program will be simple because we have a mathematical formula for this conversion. Only we have to apply these conversion formula in the programming logic.
How our Celsius to Fahrenheit conversion program will behave?
- Our program will take a number as a input which we are considering temperature in celsius.
- Now we will use celsius to fahrenheit conversion formula which is (celsius * 9 / 5) + 32.
- After this calculation result will be temperature in fahrenheit.
C Program to convert Celsius to Fahrenheit
#include <stdio.h>
int main()
{
float celsius, fahrenheit;
printf("Program to convert Temperature from Celsius to Fahrenheit\n");
printf("Enter temperature in Celsius: ");
scanf("%f", &celsius);
fahrenheit = (celsius * 9 / 5) + 32;
printf("%.2f Celsius = %.2f Fahrenheit", celsius, fahrenheit);
return 0;
}
Output
Program to convert Temperature from Celsius to Fahrenheit
Enter temperature in Celsius: 36
36.00 Celsius = 96.80 Fahrenheit
Also Prepare Below Important Question
- Python Program to add two number using Recursion
- Python Program to Find Highest Frequency Element in Array
- Python Program to Merge two Arrays
- Perform left rotation by two positions in Array Using Python
- Python Program to Delete Element at Given Index in Array
- Python Program to Delete element at End of Array
- Python Program to Copy one String to Another String
- Python Program to Remove Repeated Character from String
- Print highest frequency Character in String in Python
- Python Program to Convert lowercase vowel to uppercase
- Convert Celsius to Fahrenheit in Python
- Leap Year Program in Python
- Python Program to convert Decimal to Octal number
- Python Program to Convert Decimal Number into Binary
- Find all Pairs Whose Sum is Equal to Given number in Python
- Python Program to Replace First Vowel With ‘-‘ in String
- Python Program to find Prime factors of given integer
- Python Program to Print Prime Number in given range
- Java Program to Perform Left Rotation on Array Elements by Two
- Java Program to Perform Right Rotation on Array Elements by Two
Interview Questions Categories
C Programming Interview Preparation
Core Java Programming Interview Preparation
- Core Java Programming Coding Questions
- Core Java Pattern Programming Questions
- Core Java Programming Interview Questions