100% found this document useful (1 vote)
891 views6 pages

Unit 1 - Lab 1-Flowchart

The document provides instructions and pseudo-code for three programming tasks involving flowcharts and algorithms. Task 1 involves creating a flowchart and algorithm to list even numbers between 20 and 40. Task 2 involves creating a flowchart for an algorithm that takes times from two racers and outputs the fastest. Task 3 extends Task 2 to take times from three racers and output the fastest. Students are to complete the tasks by drawing flowcharts in Microsoft Visio and submitting them by the given due date.

Uploaded by

Son David
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
891 views6 pages

Unit 1 - Lab 1-Flowchart

The document provides instructions and pseudo-code for three programming tasks involving flowcharts and algorithms. Task 1 involves creating a flowchart and algorithm to list even numbers between 20 and 40. Task 2 involves creating a flowchart for an algorithm that takes times from two racers and outputs the fastest. Task 3 extends Task 2 to take times from three racers and output the fastest. Students are to complete the tasks by drawing flowcharts in Microsoft Visio and submitting them by the given due date.

Uploaded by

Son David
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

UNIT 1

ET2560 Introduction to C Programming

Lab #1 Flowchart

Amber McLmore
Parker
Assignment Name: LAB 1 (Unit 1)
Name:

Flowchart

Date: 09/23/2014

OVERVIEW OF COMPUTERS & PROGRAMMING


Task 1

Produce An Algorithm & A Flowchart To List Even Numbers


Between 20 & 40.

Procedure
Here Is The Pseudo-Code For An Algorithm To List The Odd Numbers Less Than 10:
1. Output List of Even Numbers less than 10
2. Put 1 in number
3. If number divided by 2 has remainder 0, go to step 5
4. Output number
5. Add 1 to number
6. If number is less than 10, go back to step 3
7. End
Step #1 Modify the above algorithm to list even numbers, and modify it to list numbers
between 20 and 40 (starting with 20 and ending with 40). Write your pseudo-code using
Microsoft Word.

1.
2.
3.
4.
5.
6.
7.

Output List of Even Numbers 20 to 40


Put 20 in number
If number divide by 2 has remainder 1 go to step 5
Output number
Add 1 to number
If number is less than 41 go to step 4
End

Step #2 Draw a flowchart (preferably using Microsoft Visio) for the algorithm you have
written.

Due Date: NEXT WEEK, Monday, September 29th, 2014 (UNIT 2)

Page 1 of 6

UNIT 1

ET2560 Introduction to C Programming

Lab #1 Flowchart

List Numbers 20 to 40

Output List numbers 20


to 40
Put 20 into number

If number divide by 2 has


remainder

Yes

No

Output Number

Add 1 to number

Yes

If number is less
than 41
No

End

Task 2

Create A Flowchart From An Algorithm To Decide The


Fastest Time Of Two Racers.

Procedure
PROBLEM STATEMENT: Alice And Bobby Each Run A Qualifying Lap. The Algorithm
Should Input The Two Racers' Times, Decide Which Is The Fastest, And Output The
Answer.
Here Is The Pseudo-Code For An Algorithm Solving The Problem.
1. Output Racer Times Program
2. Output "What was Alice's time?"
3. Input alice_time
4. Output "What was Bobby's time?"
5. Input bobby_time
6. Is alice_time < bobby_time? If no, go to step 9
7. Output "Alice was the fastest"
8. Go to step 10
9. Output "Bobby was the fastest"
10.

End

Due Date: NEXT WEEK, Monday, September 29th, 2014 (UNIT 2)

Page 2 of 6

UNIT 1

ET2560 Introduction to C Programming

Lab #1 Flowchart

Draw A Flowchart (Preferably Using Microsoft Visio) For The Pseudo-Code Above.
Run Racer Time Program
Output Racer Time
Program
Output What was Alice s
Time?
Input alice_time
Output What was Bobby s
Time?
Input bobby_time

Is alice_time < bobby_


time?

No

Yes

Output Alice was the


fastest

Go to End

Output Bobby was the


fastest

End

Due Date: NEXT WEEK, Monday, September 29th, 2014 (UNIT 2)

Page 3 of 6

UNIT 1

ET2560 Introduction to C Programming

Task 3:

Lab #1 Flowchart

Create A Flowchart From An Algorithm To Decide The


Fastest Time Of Three Racers.

Procedure
PROBLEM STATEMENT:

Alice, Bobby, And Charli Each Run A Qualifying Lap. The

Algorithm Should Input The Three Racers' Times, Decide Which Is The Fastest, And Output
The Answer.
Here Is The Pseudo-Code For An Algorithm Solving The Problem.
1. Output Racer Times Program
2. Output "What was Alice's time?"
3. Input alice_time
4. Output "What was Bobby's time?"
5. Input bobby_time
6. Output "What was Charli's time?"
7. Input charli_time
8. Is alice_time < bobby_time? If no, go to step 14
9. Is alice_time < charli_time? If yes, go to step 12
10.

Output "Charli was the fastest"

11.

Go to step 18

12.

Output "Alice was the fastest"

13.

Go to step 18

14.

Is bobby_time < charli_time? If yes, go to step 17

15.

Output "Charli was the fastest"

16.

Go to step 18

17.

Output "Bobby was the fastest"

18.

End

Draw A Flowchart (Preferably Using Microsoft Visio) For The Pseudo-Code Above.
Hint: You Can Use The Work You Did For Task 2 And Extend It For This Task, Rather Than Starting Over.

Due Date: NEXT WEEK, Monday, September 29th, 2014 (UNIT 2)

Page 4 of 6

UNIT 1

ET2560 Introduction to C Programming

Lab #1 Flowchart

Run Racer Time Program


Output Racer Time
Program
Output What was Alice s
Time?
Input alice_time
Output What was Bobby s
Time?

Input bobby_time
Output What was
Charlie s Time?
Input Charli_time

Is alice_time < bobby_


time?

NO

Yes
Is alice_time <
charli_time?

Yes

No

Output Charlie was the


fastest

Go to End

Output Alice was the


fastest

Go to End

Yes

Is bobby_time <
charli_time?
No

Go to End

Output Bobby was the


fastest
End

Due Date: NEXT WEEK, Monday, September 29th, 2014 (UNIT 2)

Page 5 of 6

ET2560 Introduction to C Programming

Due Date: NEXT WEEK, Monday, September 29th, 2014 (UNIT 2)

UNIT 1

Lab #1 Flowchart

Page 6 of 6

You might also like