0

Loops or if?

read data for 3 people. name, speed, status (safe,inj,dead) then display injured cases, avg speed of dead and max speed of safe

1st Nov 2016, 4:55 PM
AKB “Sakazuki” 14
AKB “Sakazuki” 14 - avatar
2 Answers
0
not understand your question , u display on which bases?
1st Nov 2016, 5:16 PM
Umer Waleed Hashmi
Umer Waleed Hashmi - avatar
0
Use a loop for reading each person individually. Then use if to separate cases (decide if a person must be included in the injured counting, decide if a person must be considered to take max speed of safe cases, decide if a person must be considered in averaging speeds of dead ones). The rest is math
1st Nov 2016, 6:22 PM
Emilio MĂ©coli
Emilio MĂ©coli - avatar