Write a c program in centigrade to farenheit
Answers
Answered by
1
HELLO FRIEND HERE IS YOUR ANSWER.
int main()
float celsius, fahrenheit;
printf("Please Enter temperature in Celsius: \n");
scanf("%f", &celsius);
// Convert the temperature from celsius to fahrenheit.
fahrenheit = ((celsius * 9)/5) + 32;
// fahrenheit = ((9/5) * celsius) + 32;
// fahrenheit = ((1.8 * celsius) + 32;
i hope it will help you.
★_______★_________★____________★
int main()
float celsius, fahrenheit;
printf("Please Enter temperature in Celsius: \n");
scanf("%f", &celsius);
// Convert the temperature from celsius to fahrenheit.
fahrenheit = ((celsius * 9)/5) + 32;
// fahrenheit = ((9/5) * celsius) + 32;
// fahrenheit = ((1.8 * celsius) + 32;
i hope it will help you.
★_______★_________★____________★
Answered by
1
Answer:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float c, f;
cout<<"\nEnter temp in Celsius;
cin>>c;
f=(c*(9/5))+32;
cout<<c<<"°C="<<f<<"°F";
getch();
}
Similar questions