What does the following fragment of code display? What do you think the programmer intended the code
Question:
What does the following fragment of code display? What do you think the programmer intended the code to do, and how would you fix it?
int sum = 0;
intproduct = 1;
int max = 20;
for (int i = 1; i <= max; i++)
sum = sum + i;
product = product * i;
System.out.println("The sum is " + sum +
" and the product is " + product);
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 75% (8 reviews)
The sum is 210 and the product is 210It is lik...View the full answer
Answered By
Ashington Waweru
I am a lecturer, research writer and also a qualified financial analyst and accountant. I am qualified and articulate in many disciplines including English, Accounting, Finance, Quantitative spreadsheet analysis, Economics, and Statistics. I am an expert with sixteen years of experience in online industry-related work. I have a master's in business administration and a bachelor’s degree in education, accounting, and economics options.
I am a writer and proofreading expert with sixteen years of experience in online writing, proofreading, and text editing. I have vast knowledge and experience in writing techniques and styles such as APA, ASA, MLA, Chicago, Turabian, IEEE, and many others.
I am also an online blogger and research writer with sixteen years of writing and proofreading articles and reports. I have written many scripts and articles for blogs, and I also specialize in search engine
I have sixteen years of experience in Excel data entry, Excel data analysis, R-studio quantitative analysis, SPSS quantitative analysis, research writing, and proofreading articles and reports. I will deliver the highest quality online and offline Excel, R, SPSS, and other spreadsheet solutions within your operational deadlines. I have also compiled many original Excel quantitative and text spreadsheets which solve client’s problems in my research writing career.
I have extensive enterprise resource planning accounting, financial modeling, financial reporting, and company analysis: customer relationship management, enterprise resource planning, financial accounting projects, and corporate finance.
I am articulate in psychology, engineering, nursing, counseling, project management, accounting, finance, quantitative spreadsheet analysis, statistical and economic analysis, among many other industry fields and academic disciplines. I work to solve problems and provide accurate and credible solutions and research reports in all industries in the global economy.
I have taught and conducted masters and Ph.D. thesis research for specialists in Quantitative finance, Financial Accounting, Actuarial science, Macroeconomics, Microeconomics, Risk Management, Managerial Economics, Engineering Economics, Financial economics, Taxation and many other disciplines including water engineering, psychology, e-commerce, mechanical engineering, leadership and many others.
I have developed many courses on online websites like Teachable and Thinkific. I also developed an accounting reporting automation software project for Utafiti sacco located at ILRI Uthiru Kenya when I was working there in year 2001.
I am a mature, self-motivated worker who delivers high-quality, on-time reports which solve client’s problems accurately.
I have written many academic and professional industry research papers and tutored many clients from college to university undergraduate, master's and Ph.D. students, and corporate professionals. I anticipate your hiring me.
I know I will deliver the highest quality work you will find anywhere to award me your project work. Please note that I am looking for a long-term work relationship with you. I look forward to you delivering the best service to you.
3.00+
2+ Reviews
10+ Question Solved
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Question Posted:
Students also viewed these Computer science questions
-
What does the following statement mean? Indeed, every decision we make involves some kind of trade-off. Under what condition would the statement not be true?
-
What does the following statement mean? Indeed, every decision we make involves some kind of trade-off. Under what condition would the statement not be true? Does the entrepreneur face a tradeoff...
-
What does the following app display? // Ex. 5.16: Mystery.cs 2 using System; 3 4 class Mystery { static void Main() { int x = 1; int total 0; 10 while (x
-
Dominic and Jared were general partnership has equal partners Dominic contributes cash 25,000 securities values at 50,000 and they adjusted basis of 32,000 and equipment valued at 25,000 and an...
-
Show that the thermal efficiency of a combined gas-steam power plant ï¨cc can be expressed as where ï¨g = Wg /Qin and ï¨s = Ws /Qg,out are the thermal efficiencies of the...
-
Rays of light coming from the sun (a very distant object) are near and parallel to the principal axis of a concave mirror. After reflecting from the mirror, where will the rays cross each other at a...
-
Describe what limits an aircrafts ability to maneuver.
-
Walt Wallace Construction Enterprises is investigating the purchase of a new dump truck. Interest is 9%. The cash flows for two Likely models are as follows Annual First Operating Annual Salvage...
-
Banana Bay Corporation prepares financial statements under ASPE. On February 1, 2023, Banana received authorization to issue 400,000 no par value common shares. The following transactions occurred...
-
A 450-mm-long AISI 1020 steel rod is subjected to a tensile load of 55 kN. The allowable tensile stress is 140 MPa and the allowable total elongation is not to exceed 0.2 mm. Calculate the required...
-
What does the following fragment of code display? What do you think the programmer intended the code to do, and how would you fix it? int product = 1; int max = 20; for (int i = 0; i
-
Write a grading program for an instructor whose course has the following policies: Two quizzes, each graded on the basis of 10 points, are given. One midterm exam and one final exam, each graded on...
-
The IRS prohibits companies from borrowing money to buy tax-exempts and also deducting the interest payments on the borrowing from taxable income. Should the IRS prohibit such activity? If it didnt,...
-
Suppose venture capital firm GSB partners raised $50 million of committed capital. Each year over the 12-year life of the fund, 1.5% of this committed capital will be used to pay GSBs management fee....
-
John and Ralph, two brothers who are over the age of 21, are beneficiaries of a trust created in 1983 by their father, Jim. At that time, Jim transferred securities and an apartment building to a...
-
Equations analogous to Eqs. (10.15) and (10.16) apply for excess properties. Because ln i is a partial property with respect to G E RT, these analogous equations can be written for ln 1 and ln 2...
-
Journalize the following sales transactions for Henrys Craft Shop. Explanations are not required: Feb. 3 23 Henry sold $4,000 of craft supplies on account, credit terms are 2/10, n/30, to Quick...
-
The per-unit quantity is always dimensionless. (a) True (b) False
-
When light with a wavelength of 221 nm is incident on a certain metal surface, electrons are ejected with a maximum kinetic energy of 3.28 10-19 J. Determine the wavelength (in nm) of light that...
-
Without solving, determine the character of the solutions of each equation in the complex number system. 3x 2 3x + 4 = 0
-
Write a short recursive Java method that takes a character string s and outputs its reverse. For example, the reverse of 'pots&pans' would be 'snap&stop'.
-
Al says he can prove that all sheep in a flock are the same color: Base case: One sheep. It is clearly the same color as itself. Induction step: A flock of n sheep. Take a sheep, a, out. The...
-
Alice has two circular queues,C and D, which can store integers. Bob givesAlice 50 odd integers and 50 even integers and insists that she stores all 100 integers in C and D. They then play a game...
-
Find the determinant of the linear transformation T(M): [3] M from the space V of 22 upper triangular matrices to V.
-
1. A car accelerates from rest to 16.21 meters per second in 7.66 seconds. What is the car's rate of acceleration in meters per second squared? Round your answer to two decimal places. 2. If the...
-
The debits to Work in Process-Roasting Department for Morning Brew Coffee Company for August, together with information concerning production, are as follows: Work in process, August 1, 800 pounds,...
Study smarter with the SolutionInn App