What are outputs produced by the following code segments? Show all spaces, newlines, and tabs if...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
What are outputs produced by the following code segments? Show all spaces, newlines, and tabs if any are present in the output. a. double num= 75; if (num> 90) { cout<<setw(15) << "Excellent"; } else if (num > 60) { cout <<setw(15) << "Pass"; } else if (num > 70) { cout<<setw(15) << "Good"; } else { } cout <<setw(15) << "Fail"; cout<<setprecision (2) << fixed; cout<<setw(7) << num << endl; b. void update(char &c, int count) { c = count + 2; char ch = 'A'; int i; for (i =0; i < 4; i++) update (ch, i); cout << ch; } ch ch + i; cout << ch; = C. d. double num = int max = 10; cout << fixed <<setprecesion (2); while (num < max) { cout << num << endl; num += 2; 0; } cout << etw(7) << num; char ch = 'Z'; i = 0; do { == ch = i + 2; cout << ch; i++; } while (i < 4); ch = ch + i; cout <<ch <<endl; ● ● ● ● ● ● ● Write a function that finds the factorial of a number (n!) Write a function that returns the letter grade for a given score Write a function to convert a small letter to a capital letter Write a function that returns true if a character is a small letter, false otherwise Write a function that returns true if a character is a digit, false otherwise Write a function that returns true if a character is a white space, false otherwise Write a function that returns the average of all the numbers stored in a file Write a function that finds the smallest number stored in a file Write a function that counts and returns the number of vowels inside a text file What are outputs produced by the following code segments? Show all spaces, newlines, and tabs if any are present in the output. a. double num= 75; if (num> 90) { cout<<setw(15) << "Excellent"; } else if (num > 60) { cout <<setw(15) << "Pass"; } else if (num > 70) { cout<<setw(15) << "Good"; } else { } cout <<setw(15) << "Fail"; cout<<setprecision (2) << fixed; cout<<setw(7) << num << endl; b. void update(char &c, int count) { c = count + 2; char ch = 'A'; int i; for (i =0; i < 4; i++) update (ch, i); cout << ch; } ch ch + i; cout << ch; = C. d. double num = int max = 10; cout << fixed <<setprecesion (2); while (num < max) { cout << num << endl; num += 2; 0; } cout << etw(7) << num; char ch = 'Z'; i = 0; do { == ch = i + 2; cout << ch; i++; } while (i < 4); ch = ch + i; cout <<ch <<endl; ● ● ● ● ● ● ● Write a function that finds the factorial of a number (n!) Write a function that returns the letter grade for a given score Write a function to convert a small letter to a capital letter Write a function that returns true if a character is a small letter, false otherwise Write a function that returns true if a character is a digit, false otherwise Write a function that returns true if a character is a white space, false otherwise Write a function that returns the average of all the numbers stored in a file Write a function that finds the smallest number stored in a file Write a function that counts and returns the number of vowels inside a text file
Expert Answer:
Answer rating: 100% (QA)
For a include include int main double num 75 if num 90 stdcout stdsetw15 Excellent else if num 60 stdcout stdsetw15 Pass else if num 70 stdcout stdset... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
During 2024, a company sells 20 units of inventory. The company has the following inventory purchase transactions for 2024: Date January 1 Transaction Beginning inventory September 8 Purchase Number...
-
What output is produced by the following code fragment? int num 87, max 25; = if (num >= max*2) System.out.println ("apple"); system.out.println ("orange"); System.out.println ("pear");
-
The Schwarzschild radius is the distance from an object at which the escape velocity is equal to the speed of light. A black hole is an object that is smaller than its Schwarzschild radius, so not...
-
10. Two great circle arcs on the Earth's surface leading out of London make an angle of 20. One goes to New York City, a distance of 3,046 miles, the other to Santo Domingo in the Dominican Republic,...
-
The two blocks are released from rest when r = 0.8 m and ( = 30o. Neglecting the mass of the pulley and the effect of friction in the pulley and between block A and the horizontal surface, determine...
-
In what ways can the oral communication skill be applied at school or future employment?
-
Total Networks, Inc., reported gross accounts receivable of \($1.2\) billion in 2008 and an allowance for doubtful accounts of \($300\) million. In 2009, the companys gross accounts receivable...
-
Consider the following transactions: (a) Purchased equipment for $130,000 cash (b) Issued $14 par preferred stock for cash (c) Cash received from sales to customers of $35,000. (d) Cash paid to...
-
__________ seek to achieve corporate recognition of standards deemed appropriate by society and utilize third party audits and check on partnerships. A. Conventional business partnerships (CBPs) B....
-
A division of your company purchased a large quantity of new desktop computers during the current fiscal year. An internal audit manager has asked you to audit the process used to acquire the...
-
Critical Thinking . Toward the end of the article, Phelps compares the educational loan system to the U.S. health system: "In this sense, the system functions the same way our current healthcare...
-
Many think tanks and universities have attempted to model the future of energy use. Like what Princeton University's attempted. What aspects of their model do you like? Which aspects need further...
-
(a) How is the par value maintained under the gold standard and how is the exchange rate (par value) set under the Pure Paper Standard? (b) Compare speculation under the gold standard and the pure...
-
What strategies does an RTOS employ to address priority inversion? Can you describe a scenario where priority inversion could cause critical issues and how the RTOS mitigates it ?
-
What has changed about beef production in the United States between the 1960s/70s and today? Select 2-3 aspects of beef production and explain why things have changed.
-
Based on the current population's annual growth rates and total fertility rates you can now make some general projections as to the future population geography of the world.
-
You are required to submit a highly abridged "Investment Paper" recommending a buyout of Crocs(pretend that Crocs is a privately owned) AS IF YOU WERE AN EXECUTIVE IN A PRIVATE EQUITY FIRM. For the...
-
Represent each of the following combination of units in the correct SI form using an appropriate prefix: (a) m/ms, (b) k m, (c) k s /mg, and (d) k m N.
-
Write a statement that would bind the property representing the radius of a Circle object to the property representing the value in a slider.
-
What value is contained in the integer variable size after the following statements are executed?
-
Write a recursive method to reverse a string. Explain why you would not normally use recursion to solve this problem.
-
Capstone Consolidated, Inc. is a leading manufacturer of steel products. The following inventory data relates to the firms production during the first quarter of 2015: At the end of the first quarter...
-
Consider the following inventory data for the first two months of the year for CompX International: Required 1. Calculate the cost of goods sold and ending inventory for January and February under...
-
The following inventory data is taken from the financial records of Fernandez, Inc., a personal computer software manufacturer. Required 1. Complete the following table. 2. Which inventory method...
Study smarter with the SolutionInn App