1. Modify the program below by adding a function called display that prints your name, as...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Modify the program below by adding a function called display that prints your name, as shown below. You need to write a function prototype, a function call and a function definition: */ #include <cstdlib> #include <iostream> } int main() { This program demonstrates how to call a void function. * * Desired output : Program started ***** * using namespace std; * Written by : Date : cout << "Program started\n"; return 0; // End main ****** your name here date program written Your name here ·***** t * * * * ******** Add an integer parameter to your function that represents a score on a test. Change your function so that it also prints this score in the box. ** * Your name here Score the given score Call the function with a constant parameter as follows: display (95); * 3. Call the function with a constant parameter as follows: display (88.25); What happens when this is compiled and run? What is the problem? 4. Call the function with constant values as follows to display two scores: display (64, 90); Does the function call work? If not, explain what the problem is. 5. Make all necessary changes to main to read an integer score value from the user in main and pass this value to the function in the call: display (score read); 1. Modify the program below by adding a function called display that prints your name, as shown below. You need to write a function prototype, a function call and a function definition: */ #include <cstdlib> #include <iostream> } int main() { This program demonstrates how to call a void function. * * Desired output : Program started ***** * using namespace std; * Written by : Date : cout << "Program started\n"; return 0; // End main ****** your name here date program written Your name here ·***** t * * * * ******** Add an integer parameter to your function that represents a score on a test. Change your function so that it also prints this score in the box. ** * Your name here Score the given score Call the function with a constant parameter as follows: display (95); * 3. Call the function with a constant parameter as follows: display (88.25); What happens when this is compiled and run? What is the problem? 4. Call the function with constant values as follows to display two scores: display (64, 90); Does the function call work? If not, explain what the problem is. 5. Make all necessary changes to main to read an integer score value from the user in main and pass this value to the function in the call: display (score read);
Expert Answer:
Answer rating: 100% (QA)
Add a function called display that prints your name include using namespace std Function prototype v... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Evaluate the line integral C . dr for the following functions w and oriented curves C in two ways. a. Use a parametric description of C and evaluate the integral directly. b. Use the Fundamental...
-
This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of an array of objects as a class data...
-
Canton Company makes two types of cell phones. Handy is a thin, pocket-size cell phone that is easy to carry around. Action is a palm-size phone convenient to hold while the user is talking. During...
-
Considering the stress concentration at point A in the figure, determine the maximum normal and shear stresses at A if F = 200 lbf. .y 2 in 0 12 in I-in dia. g-in R. 2 in 1-in dia. 15 in 1-in dia.
-
In the formula what do a, b, n, and x denote? = b-a n
-
(from Azma and Yor [38].) Let \(X\) be a BES \({ }^{3}\) starting from 0 . Prove that \(1 / X\) is a local martingale, but not a martingale. Establish that, for \(u <1\),...
-
The Gilster Company, a machine tooling firm, has several plants. One plant, located in St. Falls, Minnesota, uses a job order costing system for its batch production processes. The St. Falls plant...
-
What are some issues that could come up during the research and development stage of a new product that would be a reason to delay it's launch or give up on the idea completely?
-
The model with all useable variables is? Round to 2 decimal places If an answer is 0 (Zero) enter 0.00 4 Price 25099.34 + A A/ * SqFt + Thatched Roof + 46 a
-
Locate your job description at your workplace If you do not have a job description go online to Monster com and search on the Jobs tab at the top Review a job description of your choice then compare...
-
Suppose the incomes of buyers in a market for a particular normal good decrease. Draw demand and supply curves and show what will happen to the new equilibrium price and quantity. Will they increase...
-
1. At the Dentist patient chair water flows through a 2 cm diameter drain pipe with a speed of 2 m/s then through 1.5 cm diameter pipe. What is the water speed after the 2nd pipe?
-
Discuss the ways in which agricultural output can be increased. What were the most common routes to growth of output in the past? What is the most applicable route in the present?
-
2. The contact angle for water on clean glass is close to zero. Given that water climbs to a height of 2.28cm in a clean glass capillary tube with internal radius 0.32 mm at 30C. Calculate the...
-
In June 2017 the Federal Reserve announced an increase in the target Fed Funds rate.The stock market responded positively to this announcement.Explain these results using the supply and demand of...
-
Sears designed a training program to improve tool and hardware sales. The two-hour program involved distance learning and was broadcast from the Sears training facility to fifty salespersons at ten...
-
Determine which of the following limits exist. Compute the limits that exist. lim x-0 1- + 3x X
-
Ulysses and Penelope are married and file separate returns for 2012. Penelope itemizes her deductions on her return. Ulysses' adjusted gross income was $17,400, his itemized deductions were $2,250,...
-
During the 2012 tax year, Irma incurred the following expenses: Union dues..............................................................$275 Tax return preparation...
-
Larry Gaines, age 42, sells his personal residence on November 12, 2012, for $144,000. He lived in the house for 7 years. The expenses of the sale are $10,500, and he has made capital improvements of...
-
Depository institutions have been losing their advantage over other financial intermediaries in attracting customers funds. Why?
-
In the aftermath of the financial crisis of 20072009, there were calls to reinstate the separation of commercial and investment banking activities that was removed with the repeal of the...
-
The globalization of banking has led to the need for global benchmarks for interest rates. In light of the LIBOR scandal, what characteristic do you think is most central to any new interest rate...
Study smarter with the SolutionInn App