Sunday, June 12, 2011

C++ : Algorithms and Celsius Temperature Conversion Program BecomeReamur, Fahrenheit and Kelvin

Download source code

I. ANALYSIS

The formula for conversion from Celsius to Reamur, Fahrenheit,and Kelvin are as follows:

reamur = 4 / 5 Celsius
Fahrenheit = 9 / 5 C + 32
Kelvin = Celsius + 273

II. ALGORITHM

DECLARATION
C: integer} {degrees Celsius
R: real {degrees reamur}
F: real {degrees Fahrenheit}
K: real {degrees kelvin}
DESKRIPSI
read (C)
R <- 4 / 5 * C {formula R = 4 / 5 * C}F <- 9 / 8 * C + 32 {The formula F = 9 / 5 * C + 32}K <- C + 32 {The formula K = C + 273}
write (R, F, K)

Download

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More