In this tutorial, we will write a C Program to convert Fahrenheit into Celsius. Let us start by understanding the formula for the conversion of Fahrenheit into Celsius.
Fahrenheit and Celsius, both are the unit for measuring the temperature. Fahrenheit is represented by oF and Celsius by oC.
Formula to convert Fahrenheit into Celsius
celsius = (fahrenheit – 32)*5/9
C ProgrC Program to Convert Temperature from Fahrenheit to Celsius
| #include<stdio.h> void main() { float c,f; //user input printf("Enter the Fahrenheit value: "); scanf("%f",&f); //conversion c = (f - 32) * 5 / 9; //Display the result printf("Celsius: %.3f", c); } |
Output:
Enter the Fahrenheit value: 64
Celsius: 17.778
In this tutorial, we will write various C pattern programs for String. Before that, you may go through the following topics in C. for loop …
Read MoreIn this tutorial, we will write a program to find a pair of elements from an array whose sum equals a given number in java …
Read MoreIn this tutorial, we will learn to write a C program to print Diamond patterns using alphabets/characters. However, in this tutorial, we will create a …
Read MoreIn this tutorial, we will learn and code the half diamond alphabet patterns in C programming language. However, in this tutorial, we will create a …
Read MoreIn this tutorial, we will learn and code alphabet patterns in C programming language specifically the Half pyramid of alphabets in C programming. However, in …
Read MoreIn this tutorial, we will write a C program to print half Pyramid using alphabets/characters. Before that, you may go through the following topic in …
Read More