Computer Science, asked by lukekisku1512, 1 year ago

Write a c program in centigrade to farenheit

Answers

Answered by singhmahesh140
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.
★_______★_________★____________★
Answered by Soñador
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