Computer Science, asked by premchand10381, 4 days ago

Rohan,s teacher has asked him to create a program in which the users enters data in fahrenheit and it generates the output in Celsius.Which function should Rohan use to take input from user? class 6​

Answers

Answered by jeevanghimire
0

Answer:

what we need is to make a logic that can convert the given number in Celsius

(C*9/5)+32

I will write program in C cause I love the language

Explanation:

#include <stdio.h>

int main(){

float fahrenheit, Celsius;

//taking input form user

printf("Enter the temperature in Celsius \n");

scanf("%f",&Celsius);

//now to we can write the logic to convert the given expression

fahrenheit = (Celsius*9/5)+32;

// now we can print the output

printf("The temperature in Fahrenheit is %f",fahrenheit);

return 0;

}

if you are using older ide then you can include a additional library that is conio.h and instead of return 0; you can write getch();

Thank you

Similar questions