Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. The following algorithm should display the numbers 110. What is wrong with such algorithm? int x=1; while (x>10) f cout x endl; x+t; A)

image text in transcribed
image text in transcribed
image text in transcribed
1. The following algorithm should display the numbers 110. What is wrong with such algorithm? int x=1; while (x>10) f cout x endl; x+t; A) The loop is finite B) The loop doesn't make any round C) The loop prints only the number 1 D) None of the Choices 2. The following algorithm displays the numbers 110, but there is important missing operation (shown by dots). Which of these is the missing operation? int x=1 do I cout x10 D) x10); A) The loop prints only the number 1 B) The loop is infinite C) The loop prints more than 10 numbers D) The loop prints the numbers 1.9 only 5. The following algorithm should display the numbers 110. What is wrong with such algorithm? int x=1 do f cout x end; x=x+1 \} while (x=10); A) The loop is infinite B) The loop makes only one round to print 10 C) The loop makes only one round to print 1 D) None of the Choices 7. The following algorithm prints the summation of a set of integers entered by the user. The user will stop entering the integers by input 1. There is an important missing operation (shown by dots). Which of these is the missing operation? int x; cin x; while (x=1) f sum = sum +x; cin x; , cout "The Sum = " sum endl; A) int sum =1 B) int 5um=1 C) int sum =0 D) None of the Choices 8. The following algorithm prints the summation of a set of integers entered by the user. The user will stop entering the integers by input - 1 . There is an important missing operation (shown by dots). Which of these is the missing operation? int x; int sum =0; cin x; while (x=1) f cin x; cout " "The Sum =" "sum endi; A) sum =x B) sum =sum+x C) x= sum D) None of the Choices 9. The following algorithm prints the summation of a set of integers entered by the user. The user will stop entering the integers by input 1. There is an important missing condition (shown by dots). Which of these is the missing condition? int x; int sum =0; cinx

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Apache Cassandra 3 X An Expert Guide To Improving Database Scalability And Availability Without Compromising Performance

Authors: Aaron Ploetz ,Tejaswi Malepati ,Nishant Neeraj

3rd Edition

1789131499, 978-1789131499

More Books

Students also viewed these Databases questions