Computer Science, asked by venuvavilapalli1998, 2 months ago

Consider
What would be the output of the pse
START
2 Integer TotalNum, NumBoys, NumGirls, BoysPercent
3 SET BoysPercent=10
GET NumBoys
SET TotalNum = (NumBoys*100)/BoysPercent
SET NumGirls = (TotalNum* (188-BoysPercent-1)/100
Print 'Total number of pupils: TotalNum
3 Print Number of girls: NumGirls
STOP​

Answers

Answered by anuraghembrom05
24

Answer:

GET NumBoys. SET TotalNum = (NumBoys*100)/BoysPercent. SET NumGirls = (TotalNum* (188-BoysPercent-1)/ 100. Print

Answered by vinod04jangid
0

Answer:

Total number of pupils: 200, and Number of girls: 354 for NumBoys = 20

Explanation:

First we have initialized three integer variables TotalNum which represents total number of students, NumBoys which specifies number of boys, NumGirls represents number of girls and BoysPercent represents percentage of boys present in total. In the next step, BoysPercent has been set to 10. Then we take input from the user for NumBoys. Then TotalNum is calculated using the formula (NumBoys*100) / BoysPercent. Then NumGirls is calculated using the formula (TotalNum* (188-BoysPercent-1)/100. Then in the end, total number of pupils and total number of girls is gets printed in the output.

Here the output depends on the input of number of boys provided by the user.

Let's say Number of boys = 20

∴ TotalNum = (20 * 100) / 10 = 200, and

NumGirls = (200 * (188 - 10 - 1))/100

                          = 2 * 177 = 354

Therefore, output becomes Total number of pupils: 200, and

                                               Number of girls: 354

#SPJ3

To view more such questions:

https://brainly.in/question/23256239?msp_srt_exp=4

https://brainly.in/question/21198259

Similar questions