What's wrong with this code? Find all the mistakes and errors and correct them, so that...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
What's wrong with this code? Find all the mistakes and errors and correct them, so that the program executes correctly: (10 points) int number1= 10; double number2 = 5.5; int result = 0; for (int i = 0; i > 10; i++) { } if (i = 5); { } result = number1/number2; System.out.println("The result is + result"); What's wrong with this code? Find all the mistakes and errors and correct them, so that the program executes correctly: (10 points) int number1= 10; double number2 = 5.5; int result = 0; for (int i = 0; i > 10; i++) { } if (i = 5); { } result = number1/number2; System.out.println("The result is + result");
Expert Answer:
Answer rating: 100% (QA)
The Correct code is import javautil langx import jalla ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
What is wrong with this code and why it isn't working. class BankAccount: def init (self) : self.balance = 0.00 def deposit (self, amount) : self.balance += amount def withdraw (self, amount) : if...
-
I am really struggling with figuring out how to correctly make a bank deposit in QuickBooks online, I tried to deposit 50.00 into my account and in my history, for my bank account, it shows a deposit...
-
What is wrong with this "proof" that all horses are the same color? Let P(n) be the proposition that all the horses in a set of n horses are the same color. Inductive Step: Assume that P(k) is true,...
-
Which 3 accounts can't be merged in the chart of accounts?
-
Gateway, Inc., sells computers, computer products, computer peripherals, and computer accessories throughout the world. By 1988, Gateway had begun its first national advertising campaign using...
-
List the four categories of financial ratios and give an example of each. What is the purpose of ratio analysis?
-
In preparing its accounts for the year to 31 May 2007, Whiting plc had been faced with a number of accounting problems, the details of which were as follows: (i) The company had closed down its...
-
Morrow Enterprises Inc. manufactures bathroom fixtures. The stockholders equity accounts of Morrow Enterprises Inc., with balances on January 1, 2014, are as follows: Common Stock , $20 stated value...
-
Brief Exercise 18-06 Net income was $500,000 in 2018, $485,000 in 2019, and $518,400 in 2020. What is the percentage of change from (a) 2018 to 2019, and (b) from 2019 to 2020? Is the change an...
-
Walmart Stores, Inc. (Walmart) is the largest retailing firm in the world. Building on a base of discount stores, Walmart has expanded into warehouse clubs and Supercenters, which sell traditional...
-
(a) Enough Space forecasted its total funding requirements for the coming year as shown in the table below: The company was informed by its bank that short-term loans cost 6.5% p.a. and long-term...
-
Given the file structure shown in the following figure. PROJ_NUM PROJ_NAME EMP_NUM Hurricane 1 Hurricane 1 Hurricane 2 Coast 2 Coast EMP_NAME 101 John D. Newson 105 David F. Schwann 110 Anne R....
-
The customers and the potential facilities of a country have been aggregated in seven regions as shown in Figure 1. Figure 1: A B D E F G A 0 7 4 5 12 7 14 B 7 0 11 12 12 14 11 A A company would...
-
Discuss one (1) type of internal communication document and the uses for this type of document (minimum 50 words). -Discuss one (1) type of external communication document and how it is used (minimum...
-
Crane Company of Emporia, Kansas, spreads herbicides and applies liquid fertilizer for local farmers. On May 31, 2022, the company's Cash account per its general ledger showed a balance of $6,000.00....
-
This task relates to problem of temporal and situational factors in consumer behavior. Your task is to devise and compose a two-day record of how you spent time. Note all discrete activities that you...
-
1. Situational interview items have been shown to _____. a. embarrass job candidates b. elicit inaccurate information c. take too much time and effort d. have a low level of predictability e. reveal...
-
What are the 5 Cs of marketing channel structure?
-
Find the only nonzero term in the permutation expansion of this matrix. Compute that determinant by finding the signum of the associated permutation. 0010 0101 1010 0100 3323121 2-23-312 1112233...
-
Given that the linear transformation T: C3 C3, is injective, show directly that {T (e1), T (e2), T (e3)} is a linearly independent set. 2xy T 22
-
Where compute or state 'not defined'. (a) AB (b) (AB)C (c) BC (d) A(BC) /52) 2 C=(-4 4
-
1.9 Comparing Cheap Dates Around the World. Com- parison of prices or costs across different country and currency environments requires translation of the local currency into a single common cur-...
-
1.12 Andreas Delon's Compensation. Andreas Delon is a French citizen who has been offered the position of CEO of LakePharma, a large French pharmaceuticals firm. LakePharma produces high-quality...
-
1.11 Peng Plasma Pricing. Peng Plasma is a privately held Chinese business. It specializes in the manufacture of plasma cutting torches. Over the past eight years, it has held the Chinese renminbi...
Study smarter with the SolutionInn App