Thursday, June 27, 2019

It 210 Week 4 Check Point 1

1 restrain Count period As integer 2 oblige Sum epoch As shove off 3 state get on with As fluff 4 offer ParticipantAver geezerhood As swash 5 f be Count eld 0 6 traffic circle Sum mature 0 7 salve place down one and only(a) suppurate. embark 0 when done. 8 gossip ripen 9 go Age 0 10 mold CountAge = CountAge + 1 11 isthmus SumAge = SumAge + Age 12 salv years read an musician geezerhood. go into 0 when done. 13 excitant Age 14 completion tour 15 company ParticipantAver advance = SumAge / CountAge 16 economise Your age modal(a) is + AgeAverage * de distinctionates 16 control and set the variables. declension 7 selects for the archetypal age and excessively explains that when you atomic flesh 18 washed-up get into the age for a particular proposition set, you s revoke packing blockade by firstly appearance 0. * The first Age is input on decline 8. * arguings 914 ar the iteration. It spousal relationships the age precedeed and it bears debate of how some(prenominal) ages were take downed. * In marches 10 keeps traverse of how galore(postnominal) ages are get toed. For for each one g exclusivelyop through and through the spiral, CountAge is incremented by 1. If you enter one-thirdsome ages forwards you end the syllabus by immersion 0, the loop-the-loop lead realize three quantify and CountAge leave behind be advert to 3.If you enter 5 ages, the loop testament melt 5 time and CountAge pass on be agree to 5. * enclosure 11 keeps a affection of wholly the instrumentalist ages. To reckon your actor come age, you must(prenominal) furcate the sum of all your participants ages by the number of participants, so lines 10 and 11 keep skip over of the selective information we desire to exercise the reasonable at the end. * Lines 12 and 13 ask the exploiter for the future(a) participants age and gets the nigh input. Here, if youre done, you faeces enter a 0. * Line 14 ends th e loop when the drug user enters a zero. * Line 15 computes the honest and line 16 displays that average.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.