What number will the following code display on the computer screen? int sum = 0; int y
Question:
What number will the following code display on the computer screen?
int sum = 0;
int y = 0;
do
{
for (int x = 1; x <= 5; x += 1)
sum += x;
//end for
y += 1;
} while (y < 2);
cout << sum << endl;
a. 5
b. 8
c. 15
d. 30
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 76% (17 reviews)
Answered By
Ali Khawaja
my expertise are as follows: financial accounting : - journal entries - financial statements including balance sheet, profit & loss account, cash flow statement & statement of changes in equity -consolidated statement of financial position. -ratio analysis -depreciation methods -accounting concepts -understanding and application of all international financial reporting standards (ifrs) -international accounting standards (ias) -etc business analysis : -business strategy -strategic choices -business processes -e-business -e-marketing -project management -finance -hrm financial management : -project appraisal -capital budgeting -net present value (npv) -internal rate of return (irr) -net present value(npv) -payback period -strategic position -strategic choices -information technology -project management -finance -human resource management auditing: -internal audit -external audit -substantive procedures -analytic procedures -designing and assessment of internal controls -developing the flow charts & data flow diagrams -audit reports -engagement letter -materiality economics: -micro -macro -game theory -econometric -mathematical application in economics -empirical macroeconomics -international trade -international political economy -monetary theory and policy -public economics ,business law, and all regarding commerce
4.00+
1+ Reviews
10+ Question Solved
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
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 pattern of asterisks will the following code display on the computer screen? for (int x = 1; x < 3; x += 1) { for (int y = 1; y < 4; y += 1) cout < < *; //end for cout < < endl; } //end for a....
-
Four people, each with a mass of 72.4 kg, are in a car with a mass of 1 130 kg. An earthquake strikes. The driver manages to pull off the road and stop, as the vertical oscillations of the ground...
-
Consider the quadratic equation x2 - 2x + c = 0 where c is a real number. Discuss the relationship between the values of c and the three types of roots listed in Table 1.
-
What are the objectives of financial modeling?
-
Write an interaction model relating the mean value of y, E(y), to a. two quantitative independent variables b. three quantitative independent variables [Hint: Include all possible two-way...
-
Consider each of the following independent situations: a. A computer service agreement in which a company pays $150 per month and $15 per hour of technical time. b. Fuel cost of the companys fleet of...
-
When a finance lease is initially recorded at the beginning of a lease, the lessee typically debits what account? Select one: a. Lease receivable b. Lease expense c. Lease liability d. Right-of-use...
-
How do the percentile method and the pivotal method for computing bootstrapping confidence intervals compare? Choose one or more answers: a. The width of the percentile confidence interval and the...
-
What value of x causes the loop in Review Question 5 to end? int x = 16; do { cout < < x < < endl; x -= 4; } while (x > 10); a. 0 b. 8 c. 10 d. 12
-
Chakura is sitting at a table in a bookstore, attending her book signing. Customers are standing in line waiting for her to sign their copy of her book. However, it is possible that some customers in...
-
Many firms include on their employment applications a box that job seekers are asked to check if they have ever been convicted of a crime. Some firms automatically reject applicants who check the...
-
Explain in simple terms the concept of: "Technology Structures and Social Boundaries"
-
1- According to the Six Steps in Strategic Planning find out the Lidl and Mercadona strategic plan 2021-2022 in Spain. Highlight the major differences and similarities between them. 2- Make a picture...
-
Your writing must present an introduction, development and conclusion. At the end of your work include the APA references. case 1: program for the agency that provides services to the government...
-
7. (8 points) In the following VHDL process, if input A changes at time 20nS and no other inputs change after that time, at what time will all the output signals be guaranteed to have assumed their...
-
Q1. Tenure analysis: Table: employee Column Name Data Type Description employee_id Integer Unique identifier for each employee department Varchar The department of the employee job_level Varchar The...
-
Describe the gross receipts test and identify how this test relates to the business interest deduction.
-
2. In the circuit given in Figure 2, i,(t) = 5.67cos(5t)A and v (t) = 70.71 cos(5t 60) V a) Find the equivalent load impedance. State whether the load is inductive or capacitive. b) Calculate the...
-
A method that detects an error condition or exception ____________ an Exception. A. Throws B. Catches C. Handles D. Encapsulates
-
A try block includes all of the following elements except ____________. A. The keyword try B. The keyword catch C. Curly braces D. Statements that might cause exceptions
-
The segment of code that handles or takes appropriate action following an exception is a ____________ block. a. try b. catch c. throws d. handles
-
Assignment Title: The Role of Bookkeeping in Business Management and Financial Reporting Objective: Understand the importance of proper bookkeeping procedures in the management of...
-
17) The adjustment that is made to allocate the cost of a building over its expected life is called:A) depreciation expense.B) residual value.C) accumulated depreciation.D) None of the above answers...
-
9) Prepaid Rent is considered to be a(n):A) liability.B) asset.C) contra-asset.D) expense.10) As Prepaid Rent is used, it becomes a(n):A) liability.B) expense. C) contra-asset.D) contra-revenue.11)...
Study smarter with the SolutionInn App