What numbers will the following code display on the computer screen? int x = 16; do {
Question:
What numbers will the following code display on the computer screen?
int x = 16;
do
{
cout << x << endl;
x -= 4;
} while (x > 10);
a. 16, 12, 8
b. 16, 12
c. 20, 16, 12, 8
d. 20, 16, 12
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 66% (9 reviews)
b...View the full answer
Answered By
Parvesh Kumar
I am an experienced Mathematics and Statistics tutor with 10 years of experience teaching students and working professionals. I love teaching students who are passionate to learn subjects or wants to understand any mathematics and statistics concept at graduation or master’s level. I have worked with thousands of students in my teaching career. I have helped students deal with difficult topics and subjects like Calculus, Algebra, Discrete Mathematics, Complex analysis, Graph theory, Hypothesis testing, Probability, Statistical Inference and more. After learning from me, students have found Mathematics and Statistics not dull but a fun subject. I can handle almost all curriculum of mathematics. I did B.Sc (mathematics), M.Sc (mathematics), M.Tech (IT) and am also Gate (CS) qualified. I have worked in various college and school and also provided online tutoring to American and Canadian students. I look forward to discussing with you and make learning a meaningful and purposeful
5.00+
4+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
What numbers will the following code display on the computer screen? int x = 0; do { cout < < x < < endl; x += 1; } while (x < 5); a. 0, 1, 2, 3, 4 b. 0, 1, 2, 3, 4, 5 c. 1, 2, 3, 4 d. 1, 2, 3, 4, 5
-
What numbers will the following code display on the computer screen? int total = 1; do { total += 2; cout < < total < < endl; } while (total
-
What number will the following code display on the computer screen? int sum = 0; int y = 0; do { for (int x = 1; x
-
Financial statements for the ACTACTSTAT Company are given below: During 2021 the firm declared and paid cash dividends of P85,000. There were 50,000 shares of common stock outstanding throughout the...
-
Experiment c. Consider again the data presented in Section 6.6, Exercises 1-4, Find the median and the mode, and compare with the expectation. When is the median greater than the expectation?...
-
What is an accounting system? Why is it important that a business has an effective accounting system?
-
Senathirajah and Purtill share profits in a proportion of 60:40. Senathirajah is entitled to a salary allowance of \($120\)000 p.a., and Purtill is entitled to \($110000\) p.a. Capitals are fixed at...
-
Comprehensive Depreciation Computations Kohl beck Corporation, a manufacturer of steel products, began operations on October 1, 2009. The accounting department of Kohl beck has started the...
-
The _ _ _ _ function enables you to retrieve separate characters in a string. A . at ( ) B . char _ at ( ) C . indexof ( ) D . value _ of ( )
-
1. Tesla uses lease accounting for automotive sales under its resale value guarantee program. Assume that instead of using lease accounting for automotive sales under its resale value guarantee...
-
If necessary, create a new project named Advanced27 Project, and save it in the Cpp8\Chap07 folder. Enter the C++ instructions shown earlier in Figure 7-11 into a source file named Advanced27.cpp....
-
Complete a desk-check table for the code shown in Figure 8-21. What will the code display on the computer screen? What value causes the nested loop to end? What value causes the outer loop to end?...
-
Determine whether each statement is true or false. If it is false, correct the statement so that it is true. a is positive for all positive numbers a.
-
You have been assigned to calculate the long-term capital Its marginal tax rate is 21% Weighted-Average-Cost-of-Capital (WACC) for your small firm. The company has three sources of First, there are...
-
Credit card abuse has become a billion dollar industry in the United States. Discuss your use in both secure and non-secure sites on the Internet, over the telephone, and in various stores. How easy...
-
Goulet Inc., set up as a privately held corporation, operating as a ready to wear garments retailer, of which 100% of the Common Shares are owned by Lawrence Goulet. You were hired to account for...
-
Given a stacks, and the following method, what is the output of test ("Racecar"); ? public boolean test(String t) { Stack s = new Stack(); Stack u = new Stack(); for(int j = 0; j < t.length(); j++)...
-
HCO Company would like to determine the start dates for tasks that they need to work on. Set a spreadsheet that accepts as inputs an end date and the number of working days for a task. HCO Company...
-
Midwest Industries produces and distributes industrial chemicals in its Belco Division, which is located in Michigan's Upper Peninsula. Belco's earnings increased sharply in 2016, and bonuses were...
-
Element compound homogeneous mixture (heterogeneous mixture) 4) A piece of gold has a mass of 49.75 g. What should the volume be if it is pure gold? Gold has a density of 19.3 g/cm (3 points) D=m/v...
-
Which of the following calculates the monthly payment (expressed as a positive number) for a loan of $10,000 for 2 years with a 3.5% annual interest rate? a. Financial.Pmt(0.035, 2, 10000) b....
-
To make the btnCalc control the default button, you need to set the _____________________ property. a. btnCalcs AcceptButton b. btnCalcs DefaultButton c. forms AcceptButton d. forms DefaultButton
-
If a list boxs Sorted property is set to False, how will the numbers 4, 35, 3, 1, and 12 be displayed in the list box? a. 4, 35, 3, 1, 12 b. 1, 3, 4, 12, 35 c. 1, 12, 3, 35, 4 d. 35, 12, 4, 3, 1
-
4. A partnership owns an aging 4-unit retail center in a local campus property. Cash flow projections for the next 10 years are: $50,000 for years 1 and 2; $60,000 for years 3 and 4; $70,000 for...
-
given A = 2 -2 3 ' 3 4 2 , 4 2 5 2 2 B= 3 -3 2 2 1 2 1 4 2 2 3 F= 4 2 3 - 2 -2 4 2 3 2 3 4 2 4 I Find the resulting matricas based on the arth metic operation. attach solution on your the comment...
-
The 40 members of a recreation class were asked to name their favorite sports. The table shows the numbers who responded in various ways. Use information given in the table to answer the following...
Study smarter with the SolutionInn App