Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

https://www.chegg.com/homework-help/questions-and-answers/part1-questions-https-

ID: 656066 • Letter: H

Question

https://www.chegg.com/homework-help/questions-and-answers/part1-questions-https-wwwcheggcom-homework-help-questions-answers-q7390059-q7390063

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. /* This program demonstrates how to call a void function. Written by : your name here Date : date program written include include using namespace std; int main (int argc, char *argv[]) cout

Explanation / Answer

#include <iostream>
#include <cstdlib>
using namespace std;

// function declaration
void display();
int main(int argc, char* argv[])
{
   cout<< "PROGRAM STARTED";
String name;

cIN >> "ENter your name">>name;

     display(name);
     return 0;
}

void display(std::string z)
{
    cout << "your name is" << z;
}