Question

No subject Start count 1 Tes Read num Print count count 1 End

what does this algorithm do?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The program initially takes two variables sum and count with values 0 and 9 respectively

then starts a loop in which it checks the for the condition if the count value is greater than 0 or not

The condition gets true, and the program enters the loop,

it reads an input from user and stores it in a variable num

then it adds the value read from the user to the value of sum (which was initially 0)

then it decreases the value of count by 1

this loop continues till count value is not equal to zero

when the value of count reaches to zero the if condition fails and the control passes to else block

Here, division by 9 is performed on the calculated sum and stored in the variable x.

Then the value is printed and the program ends

Add a comment
Know the answer?
Add Answer to:
what does this algorithm do? No subject Start count 1 Tes Read num Print count count...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT