84.1k views
5 votes
Is my answer correct? I am having trouble and this is AP Computer Science Principles

A. Step 3: display the remainder of number Divided by 10 and store the remainder in number
B. Step 3: display the remainder of number Divided by 10 and store the integer quotient in number
C. Display the integer quotient of number divided by 10 and store the remainder in number
D. Display the integer quotient of number divided by 10 and store the integer quotient in number

Is my answer correct? I am having trouble and this is AP Computer Science Principles-example-1
User Tymothytym
by
5.5k points

1 Answer

5 votes

Answer:

B. Step 3: display the remainder of number Divided by 10 and store the integer quotient in number

Step-by-step explanation:

Suppose we divide 512 by 10. Then 2 is the remainder, and 51 is integer quotient. Hence, as required, we need to print 2 and store as well as reuse 51 as the number. We need to continue this until the number is zero. And hence, the correct option here is B. as it fulfills the above requirement.

User Dennislloydjr
by
6.0k points