(a) The following code segments are erroneous. Correct the error(s) in each segment of code below....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
(a) The following code segments are erroneous. Correct the error(s) in each segment of code below. i) double mainint = 3000.0; double int = 1.016 * mainint; cout < < setprecision (2) < < fixed; cout < < "The calculated amount is" < < int; ii) int t; cout < < "Enter a number: "; cin < < T; cout < < "Your number is " < < t; ii) X = 1; while ( x (a) The following code segments are erroneous. Correct the error(s) in each segment of code below. i) double mainint = 3000.0; double int = 1.016 * mainint; cout < < setprecision (2) < < fixed; cout < < "The calculated amount is" < < int; ii) int t; cout < < "Enter a number: "; cin < < T; cout < < "Your number is " < < t; ii) X = 1; while ( x
Expert Answer:
Answer rating: 100% (QA)
1 we are getting error because the variable name in... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Draw the tension in each segment of the cable and the cable?s total length. 4 ft 50 Ib 4 ft 5ft 3 ft 100 lb
-
Draw the tension in each segment of the cable and the cable?s total length. 2 ft 5 ft D. 50 Ib +3 ft- 4 ft 3 ft 80 lb
-
Determine the tension in each segment of the cable and the cable?s total length. Set P = 80 lb. 2 ft 5 ft 50 lb -3 ft ft- -4 ft- -3 ft-
-
Julia Robertson is a senior at Tech, and she's investigating different ways to finance her final year at school. She is considering leasing a food booth outside the Tech stadium at home football...
-
List the three statements that make up the modern atomic theory.
-
Cadillac Construction Company uses the retirement method to determine depreciation on its small tools. During 2009, the first year of the company's operations, tools were purchased at a cost of...
-
Hooters Restaurant in Myrtle Beach, South Carolina, used an alternative dispute resolution program, a program to resolve disputes outside the traditional court system. Employees of Hooters had to...
-
1. Why is the operations function important in implementing the strategy of an organization? Explain why the changes put in place by Victoria Chen and her team could either hurt or help the bank. 2....
-
Figure shows the spring-mass damper system of two degree of freedom with free vibrations. If m = m, m = 2.5m, c =C2=C3 = 2c, k = k, k = 2.5k and k3 = 3k. a) Draw the free body diagram & derive the...
-
The Fashion Rack is a retail merchandising business that sells brand-name clothing at discount prices. The firm is owned and managed by Teresa Lojay, who started the business on April 1, 20X1. This...
-
answer the following question. 1 $27 500 000 Year FCFS . 2 $30 100 000 3 $32 800 000 4 $35 400 000 WACC (r) = 15% Growth rate (g) = 7% Market Value of Debt & Preferred Equity = $100 000 000 Shares...
-
A slurry pond has a volume of 6 x 106 m or 1.57 billion US gallons and a surface area of 100 acres. It is full to the brim. The suspended solid volume fraction in the slurry at the start was 42%....
-
Daniella has just invested $20,000 in a mutual fund. She has enrolled in a "ratio withdrawal" plan which is set to pay out 20% of the value of the fund each year, at the beginning of the year. Assume...
-
Mrs. Anderson owned a house at 420 Adams Street in your city, your county , your state. At the time of her death, she was delinquent on her real property taxes. She was a ward of a public guardian....
-
Analyze the program below. What is its effect on input, i.e. its effect on n? Describe in one sentence. symbols = [ "0", "8" ] def c (n): "1", "2" "3" "9" "a" "b" = digits [] while n != 0: 2 n, r =...
-
Dan Snyder wants sell his NFL franchise immediately (in USD), with no risk.He has one offer of JPY 100 Billion from a Japanese consortium, and another for GBP 700MM from a London group.Both offers...
-
what is the tax law consequences if ABC company changes it's intention to sell remaining parcel and instead to build properties. please reference to advise tax law and relevant accounting standards.
-
H Corporation has a bond outstanding. It has a coupon rate of 8 percent and a $1000 par value. The bond has 6 years left to maturity but could be called after three years for $1000 plus a call...
-
Describe the two ways in which control statements can be combined.
-
Discuss a situation in which it would be more appropriate to use a dowhile statement than a while statement. Explain why.
-
Perform the following tasks for an array called table: a) Declare the variable and initialize it with a rectangular integer array that has three rows and three columns. Assume that constant...
-
If the cost of textbooks were included in tuition, what would likely happen to their prices? Why?
-
True or false? In the United States, the invisible hand ensures that only socially valuable businesses are started. Why?
-
Are most businesses in the United States corporations? If not, what are most businesses?
Study smarter with the SolutionInn App