0% found this document useful (0 votes)
38 views1 page

Act 7 - Looping

Uploaded by

Khysval Walker
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views1 page

Act 7 - Looping

Uploaded by

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

COMPROG

Computer Programming (OOP)


Laboratory

Activity 7: Looping

Overview: A loop statement allows us to execute a statement or group of statements


multiple times and following is the general from of a loop statement in most of
the programming languages.

C++ programming language provides the following type of loops to handle


looping requirements. While loop; for loop; do loop.

In this activity, student will be able to create a program that implements an


iterative program flow.

File Name: Lastname_Act7

Description: The arrival rate of students at the University of the Cordilleras’ main gate can be
estimated using the Poisson probability function:

where x = the number of student arrival per minute;


p= the average number of student arrivals per minute;
e = Euler’s number (2.71828); and
P(x) = probability of x students per minute.

Requirements Using the Poisson probability function, write a C++ program to accept the
average arrival rate of students per minute as input. Determine the probability of
1 to 20 students attempting to enter UC campus in one-minute period.

Test Case

You might also like