Page 1 of 1

Reputation:

# Celsius to Fahrenheit Conversion

Posted 31 October 2010 - 07:43 AM

```Main module
Write “This program converts Celsius to Fahrenheit and vice versa”
call Input module
call Perform Calculation module
call Output Results module

Input module
Declare Fahrenheit, Celsius, Fahrenheit1, Celsius1 as float
Declare Degree-2B-Converted as character
write "Are you converting Celsius to Fahrenheit? (Y /N) "
input Degree-2B-Converted
If Degree-2B-Converted = Y
write "Please enter a Celsius degree for converting"
Input Celsius1
else
if Degree-2B-Converted = N
write "Please enter a Fahrenheit degree for converting"
input Fahrenheit1
else
write "You have entered an invalid entry. Please re-enter a valid character of C or F"
end if
end if

Perform Calculation module
Set Fahrenheit = (Celsius1 * 9)/5 + 32
Set Celsius = (Fahrenheit1 -32) * 5/9

Output Results module
Write “With ” << Celsius1 << “Celsius, the Fahrenheit is: “ << Fahrenheit
Write “With ” << Fahrenheit1 << “Fahrenheit, the Celsius is: ” << Celsius

```

This post has been edited by macosxnerd101: 31 October 2010 - 09:10 AM
Reason for edit:: Added code tags.

Is This A Good Question/Topic? 0

## Replies To: Celsius to Fahrenheit Conversion

### #2 CTphpnwb

• D.I.C Lover

Reputation: 2486
• Posts: 8,533
• Joined: 08-August 08

## Re: Celsius to Fahrenheit Conversion

Posted 31 October 2010 - 07:50 AM

• USE CODE TAGS!
• Don't revive long dormant topics. Start a new topic.

### #3 macosxnerd101

• Self-Trained Economist

Reputation: 9044
• Posts: 33,553
• Joined: 27-December 08

## Re: Celsius to Fahrenheit Conversion

Posted 31 October 2010 - 09:12 AM

### #4 jimblumberg

Reputation: 3059
• Posts: 9,305
• Joined: 25-December 09

## Re: Celsius to Fahrenheit Conversion

Posted 31 October 2010 - 09:16 AM

Ok I looked at your pseudo code.

Now what?

Do you have a question?

Jim

### #5 Brewer

• Awesome

Reputation: 175
• Posts: 1,044
• Joined: 14-June 10

## Re: Celsius to Fahrenheit Conversion

Posted 31 October 2010 - 09:17 AM

Page 1 of 1

 Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).