Computers and Technology

Write a while loop that prints userNum divided by 4 (integer division) until reaching 2. Follow each number by a space. Example output for userNum = 160:

40 10 2

Note: These activities may test code with different test values. This activity will perform four tests, with userNum = 160, then with userNum = 8, then with userNum = 0, then with userNum = -1. See "How to Use zyBooks".

Also note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds, and report "Programend never reached." The system doesn't print the test case that caused the reported message.

#include
using namespace std;

int main() {
int userNum;

cin >> userNum;

/* Your solution goes here */

cout << endl;

return 0;
}

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 00:30, sethhdoty
Use the keyword strategy to remember the meaning of the following word. the meaning for the word has been provided. write your keyword and describe the picture you would create in your mind. obfuscate: to make something so confusing that it is difficult to understand.
Answers: 2
image
Computers and Technology, 24.06.2019 02:00, sameh0425
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
image
Computers and Technology, 24.06.2019 09:50, ira51
Suppose you are an ad-serving company and you maintain a log of cookie data for ads you serve to the web pages for a particular vendor (say amazon). a. how can you use this data to determine which are the best ads? b. how can you use this data to determine which are the best ad formats? c. how could you records of past ads and ad clicks to determine which ads to send to a given ip address? d. how could you use this data to determine how well the technique you used in your answer to part c was working? e. how could you use this data to determine that a given ip address is used by more than one person? f. how does having this data give you a competitive advantage vis-à-vis other ad-serving companies?
Answers: 2
image
Computers and Technology, 24.06.2019 11:30, nate1808
What does the https: // mean when you type in a website
Answers: 1
Do you know the correct answer?
Write a while loop that prints userNum divided by 4 (integer division) until reaching 2. Follow each...

Questions in other subjects:

Konu
Mathematics, 19.01.2021 05:50
Konu
Physics, 19.01.2021 05:50