(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...
-
In a sample of 900 gas stations, the mean price of regular gasoline at the pump was $3.746 per gallon and the standard deviation was $0.009 per gallon. A random sample of size 55 is selected from...
-
State the total degrees of freedom for the following t tests: (a) n = 12 for a one-sample t test (b) df1 = 12, n2 = 19 for a two-independent-sample t test (c) Critical value = 1.645 for a one-tailed...
-
What would it mean if a difference were statistically significant but the effect size were not meaningful?
-
Indicate which departmentaccounts payable, cash disbursements, data processing, purchasing, inventory, or receivinghas ownership over the following tiles and registers: a. Open purchase order tile b....
-
The company is best buy. please find the numbers in the SEC List the stock market prices shown in the annual report. This information should cover at least each quarter for the past 2 years (...
-
On January 1, 2020, Goodhue Inc. had the following stockholders equity balances. Common Stock (400,000 shares issued) ........................................ $800,000 Paid-in Capital in Excess of...
-
Which curved arrow mechanism is correct for the acetylation of DL-phenylalanine? ( A. Na B. . O D. 00 Na Na 00 + OH OH2 Na OH NH + H2O 0 NH NH NH NH NH NH + H2O + H2O + H2O 0= 00 0= o NH OH O OH NH...
-
Lauridsen Design Inc. (LDI) is an architectural and design firm located in Calgary, Alberta. LDI has an information technology services group (IT Services) and a finance and accounting services group...
-
The plaintiff, WandaRer, is aCanadian and a self-described artist, photographer, and social media influencer. For almost a decade, Ms. Rer has traveled the world with her camera. Ms. Rer has her...
-
You are the budgeting manager for Summertime Grills Limited. The company makes two types of gas grills - the Tailgater and the Master Chef. For each of the two models, three raw materials are...
-
A driver needs new tires for her car and is trying to decide if she should purchase "low rolling resistance" tires. The regular tires cost $300 (for all 4 tires) and will last 3 years. The "low...
-
Scenario 1: A person falls through a floorboard at a dance club that the owner of the club was aware of and did not repair because of the cost. Scenario 2: A person slips on a banana peel in a...
-
A ball is thrown directly downward with an initial velocity of 9m/s from a height of 2 5 m. What is the time ( in s ) it takes to strike the ground.
-
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...
-
Use the code given earlier for R to make this plot. The command would be plot(percentage)
-
Why would you not feel comfortable computing a Pearson correlation on the data in Exercise 9.10? Exercise 9.10 Down syndrome is another problem that psychologists deal with. It has been proposed that...
-
In Exercise 9.1 the percentage of mothers over 40 does not appear to be important, and yet it is a risk factor in other societies. Why do you think that this might be? Exercise 9.1 In Sub-Saharan...
Study smarter with the SolutionInn App