Program Discussion :: Basics
100 / 279
Write a program to convert Fahrenheit to centigrade and test that program and tell an exact value to test all most all scenario.
Answer:
#include
#include
#include
using namespace std;
void main()
{
clrscr();
float fah, cel;
coutfah;
cel=(fah-32) / 1.8;
cout
Asked In ::
Language:
Nandy
7 Jul, 2017 9:30 AM
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
float fah, cel;
printf("Enter temperature in Fahrenheit : ");
scanf("%f",&fah);
cel=(fah-32) / 1.8;
printf("Temperature in Celsius = %f",cel);
getch();
}
Language:
Aarav
7 Jul, 2017 9:30 AM
#include<stdio.h>
#include<conio.h>
#include<iostream>
using namespace std;
void main()
{
clrscr();
float fah, cel;
cout<<"Enter temperature in Fahrenheit : ";
cin>>fah;
cel=(fah-32) / 1.8;
cout<<"Temperature in Celsius = "<<cel;
getch();
}