Question: Objectives : After completing this lab, you will be able to: Create a counter-control loop with Raptor PreLab Do the following activities before doing the

Objectives:

After completing this lab, you will be able to:

  • Create a counter-control loop with Raptor

PreLab

Do the following activities before doing the lab assignment.

  • Read chapter 5 (Logic Design book) Using a Definite Loop with a Counter

Problem

The formula for converting a temperature from Celsius to Fahrenheit is F = 9.0 C + 32 5

Create a Raptor flowchart to display a table of the Celsius temperatures from 0 to 15 and their Fahrenheit equivalents. Name the file lab91.rap.

Sample output Celsius Fahrenheit 0 32.00 1 33.80 2 35.60 3 37.40 4 39.20 5 41.00 6 42.80 7 44.60 8 46.40 9 48.20 10 50.00 11 51.80 12 53.60 13 55.40 14 57.20 15 59.00

Hints:

  1. Display "Celsius Fahrenheit" using the Raptor output symbol
  2. Set the counter variable celsius to 0
  3. Insert the Raptor loop structure. The loop condition is celsius <=15. If the condition is true, the calculate Fahrenheit as Fahrenheit = 9.0/5.0 * celsius + 32. Display Celsius and Fahrenheit using the output symbol. celsius + " " + fahrenheit Increment celsius by one celsius = celsius + 1
  4. If the condition is false (No), then end the Raptor flowchart

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!