Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2K views

C Programming Homework Unit 1 Lab 1

The document contains two algorithms summarized as follows: 1. An algorithm to list even numbers between 20 and 40 by starting at 20, outputting the number if it is even by checking the remainder of dividing by 2, incrementing the number by 1, and repeating until the number is less than 41. 2. An algorithm to determine the faster racer between Bobby and Alice by outputting prompts to enter each racer's time, comparing the times, and outputting "Tie" if equal or the faster racer's name if one is less than the other.

Uploaded by

Jeff Brown
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

C Programming Homework Unit 1 Lab 1

The document contains two algorithms summarized as follows: 1. An algorithm to list even numbers between 20 and 40 by starting at 20, outputting the number if it is even by checking the remainder of dividing by 2, incrementing the number by 1, and repeating until the number is less than 41. 2. An algorithm to determine the faster racer between Bobby and Alice by outputting prompts to enter each racer's time, comparing the times, and outputting "Tie" if equal or the faster racer's name if one is less than the other.

Uploaded by

Jeff Brown
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Jeff Brown Unit 1 Lab 1 Class # ET2560T Task 1: Make Pseudo algorithm & flowchart to list even numbers

between 20 and 40. Algorithm: 1. Start 2. Output List of Even Numbers 20 to 40 3. Put 20 in number 4. If number divide by 2 has remainder 1 go to step 6 5. Output number 6. Number + 1 7. If number is less than 41 go to step 4 8. End

Task 2: Create Pseudo flowchart from algorithm to decide the fastest time of two racers. Algorithm: 1. Output Enter Bobbys Time 2. Put Bobbys Time in number 3. Output Enter Alices Time 4. Put Alices Time in number 5. If Alice = Bobby, Output Tie 6. If Bobby < Alice, Output Bobby 7. If Alice < Bobby, Output Alice 8. End

You might also like