Answered step by step
Verified Expert Solution
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 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...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started