Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
804 views
in Information Technology by (15 points)
Write an algorithm to convert temperature from Celsius to Fahrenheit

Please log in or register to answer this question.

1 Answer

+1 vote
by (90 points)

The algorithm for the conversion of temperature from Fahrenheit to Celsius is as follows:

  1. Read the temperature given in degree Fahrenheit.
  2. Convert the temperature in Fahrenheit into Celsius using the formula : C=5/9*(F-32)
  3. Print the Fahrenheit and Celsius value of temperature.
  4. End

The code for the same is -

# include < stdio . h >

# include < conio . h >

void main (  )

{

         float    a , b ;

         clr scr( ) ;

         printf(" Fahrenheit: ");

         scanf("%f", & b );

         a = ( b - 32 ) * ( 5 / 9 ) ;

         printf(" \ n \ t % . 2b Fahrenheit = % . 2b Centigrade " , b , a ) ;

    

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...