Chapter - 1: Getting Started

Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program to convert this temperature into Centigrade degrees.


C
Sections
4
Exercises

A

B

C

1

2

3

4

5

6

7

#include<stdio.h>
#include<conio.h>
int main()
{
	float f,c;
	printf("Enter the temperature in Fahrenheit : ");
	scanf("%f", &f);
	
	//conversion of temperature
	c=(f-32)*100/180;
	
	printf("\n%f is that temperature in celcius.", c);
	
	getch();
	return 0;
}

© 2020 Garbage Valuegarbage value logo