Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

College of Engineering – Department of Electrical Engineering

Activity 4

Repetition Structures

A. Calories Burned

You're working on a fitness app, and you want to help users estimate their calorie
expenditure during treadmill workouts. You know that running on a particular treadmill burns 3.9
calories per minute. Design a program that uses a loop to display the number of calories burned after
10, 15, 20, 25, and 30 minutes of running. Additionally, calculate and display the total calories burned
after all these durations.

Provide the following:

a) Pseudocode
b) Flowchart
c) Program with screenshot of output

B. Sum of Numbers

You're developing a finance application that helps users keep track of their expenses. Create a
program with a loop that asks the user to enter a series of positive numbers representing expenses.
The user should enter a negative number to signal the end of the series. After all the positive
numbers have been entered, the program should display the following:

 The sum of the positive numbers entered.


 The number of positive expenses entered.
 The average (mean) of the positive expenses, rounded to two decimal places.

Provide the following:

a) Pseudocode
b) Flowchart
c) Program with screenshot of output

Alangilan, Batangas City, Philippines

+63 43 425 - 0139 loc. 2121

www.batstate-u.edu.ph coe.alangilan@g.batstate-u.edu.ph

You might also like