subject

Write a program to prompt the user for a positive integer: N. The program will repeatedly divide the input in half using a loop, discarding any fractional part, until it becomes 1. The program should print on separate lines:
• the sequence of ‘halved’ value, one per line
• the number of iterations required
• the value of log2(N)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
Aplan to budget time for studying and activities is referred to as a study routine. study habits. study skills. a study schedule.
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
1. ask the user how many questions are in the quiz. 2. ask the user to enter the key (that is, the correct answers). there should be one answer for each question in the quiz, and each answer should be an integer. e.g., 34 7 13 100 81 3 9 10 321 12 might be the key for a 10-question quiz. you will need to store the key in an array. 3. ask the user to enter the answers for the quiz to be graded. there needs to be one answer for each question. note that these answers do not need to be stored; each answer can simply be compared to the key as it is entered. 4. when the user has entered all of the answers to be graded, print the number correct and the percent correct. 5. add a loop so that the user can grade any number of quizzes with a single key. after the results have been printed for each quiz, ask "grade another quiz? (y/n)." note: you only have one array (the key). you are not creating a new key for each set of quiz answers.
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
1. which of the following is not an example of an objective question? a. multiple choice. b. essay. c. true/false. d. matching 2. why is it important to recognize the key word in the essay question? a. it will provide the answer to the essay. b. it will show you a friend's answer. c. it will provide you time to look for the answer. d. it will guide you on which kind of answer is required.
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
You know the right answer?
Write a program to prompt the user for a positive integer: N. The program will repeatedly divide the...
Questions
question
Geography, 28.01.2020 03:31
question
Mathematics, 28.01.2020 03:31
question
Mathematics, 28.01.2020 03:31
question
Biology, 28.01.2020 03:31
Questions on the website: 13722359