Tuesday, June 12, 2012

If else statement: Temperature Conversion

Assalamu Alaikum. Hope, you all are well by the grace of Almighty ALLAH. Today we learn how to do temperature conversion by if else statement. let's look at the problem.

Problem: Let consider the conversion rate of Centigrade and Fahrenheit are C/5 = (F-32)/9 . Write a program that first takes the choice from the user what conversion he/she wants. Then a temperature is given as input. Convert the temperature and output the result according to the given choice.

Solution:



Thank you all..:)

0 comments:

Post a Comment