subject

The following algorithm is intended to take a positive integer as input and display its individual digits in order from right to left. For example, if the input is 512, the algorithm should produce the
output 2 1 5. Step 3 of the algorithm is missing.
Step 1: Input a positive integer from the user and store it in the variable number.
Step 2: Divide number by 10 and record the integer quotient and the remainder. The integer
quotient is the quotient with any part after the decimal point dropped. For example, when 127 is
divided by 10, the quotient is 12.7, the integer quotient is 12 and the remainder is 7.
Step 3: (missing step)
Step 4: Repeat steps 2 and 3 until number is 0.
Which of the following can be used as step 3 so that the algorithm works as intended?
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
Step 3: Display the integer quotient of number divided by 10 and store the remainder in
number.
D
Step 3: Display the integer quotient of number divided by 10 and store the integer quotient in
number.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Imagine that you have a friend who is starting a small business and is interested in using social media to spread the word. he is not certain that it is a good move, and has come to you for . would you advise him to use social media to advertise his business? why or why not? support you answer with information from the text.
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Write a function called checkfactor that takes two arrays of positive numbers, firstnumberrow and secondnumberrow. checkfactor checks if the first entry in firstnumberrow is divisible by the first entry in secondnumberrow, and performs the same operation on the next array elements until all entries have been checked. all the numbers are positive and the number of entries in the arrays are the same. the function should return the identified divisible numbers in two row arrays named firstdivisible and seconddivisible.restrictions: branches or loops should not be used. the code must use the internal mod and logical functions.hint: the mod function should be used to determine if two numbers are divisible. ex: for num1 and num2 if mod(num1,num2) is 0, then the two numbers are divisible.this is matlab
Answers: 2
question
Computers and Technology, 24.06.2019 20:00
Avirus enters a computer or network as code embedded in other software directly from another computer
Answers: 1
question
Computers and Technology, 25.06.2019 05:30
Why are weather forecasts more reliable now compared of hundred years ago
Answers: 1
You know the right answer?
The following algorithm is intended to take a positive integer as input and display its individual...
Questions
question
English, 02.11.2020 23:30
question
Mathematics, 02.11.2020 23:30
question
Mathematics, 02.11.2020 23:30
question
Mathematics, 02.11.2020 23:30
Questions on the website: 13722362