63.0k views
2 votes
Assignment :

Write A Pseudocode to:

1. Prompt the user for a numeric value representing a temperature in fahrenheit

2. Convert the temperature to degree celcius

3. Print the message "It's Cold" if the temperature in degree celcius is less than 17

User Andy R
by
4.4k points

1 Answer

4 votes

Step-by-step explanation:

1. We declare and initialize the variables F and C, which are of float type.

2. We ask the user to enter a temperature value in °F at the console.

3. We write that value in the variable F.

4. We convert °F to °C by using the formula:

C°= (°F-32) × 5/9 and we write that value in the variable F.

5. After that, we use if to ask if the temperature in °C is less than 17°. Ex: if(C<17). If so, the text: "It's Cold" appears on the screen.

A pseudo code is a code that is not written by an algorithm, but is spoken orally or written in this way.

It is very similar to our language, but that is why it is more different from the language of computers.

User JLTChiu
by
4.0k points