45.5k views
1 vote
Draw the flowchart and pseudocode for a program allowing the user to enter the speed and time from the keyboard to calculate distance.

1 Answer

3 votes

Answer:

Flowchart:

START

INPUT speed

INPUT time

SET distance = speed * time

OUTPUT distance

END

Pseudocode:

DECLARE speed, time, distance

PRINT "Enter the speed:"

INPUT speed

PRINT "Enter the time:"

INPUT time

SET distance = speed * time

PRINT "The distance is:", distance

Step-by-step explanation:

This pseudocode declares three variables: speed, time, and distance. The user is prompted to enter the speed and time values. The distance is then calculated as the product of speed and time. Finally, the calculated distance is outputted to the user.

User Gesselle
by
7.7k points