Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Modify the program below by adding a function called display that prints your name, as shown below. You need to write a function

1. Modify the program below by adding a function called display that prints your name, as shown below. You Add an integer parameter to your function that represents a score on a test. Change your function so that it

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 #include } int main() { This program demonstrates how to call a void function. * * Desired output : Program started ***** * using namespace std; * Written by : Date : cout < < "Program started "; 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);

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Add a function called display that prints your name include using namespace std Function prototype v... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions