Question: It's C++ programming need help. The question is Expand last weeks program by making the greeting function expect anargument indicating the name of the
It's C++ programming need help.
The question is " Expand last weeks program by making the greeting function expect anargument indicating the name of the person to be greeted"?
The code is below and the assginment.
#include
//Create a program that randomly chooses between 3 possible greetings
int main() { //sets variable int new_greeting; //set three greetings into array string Exuberant_greeting[3] = {"Resistance is futile.", "Heeeeere's Johnny!", "Hello, my name is Inigo Montoya. You killed my father. Prepare to die!"}; do { srand(time(NULL)); //seed random number //chooses one of the three greetings randomly int random_greeting = rand() % 3;
//outputs results cout

15 Parameters Key terms: parameter Reading: Tutorialspoint's C++Functions6 Exercise: Expand last week's program by making the greeting function expect an argument indicating the name of the person to be greeted The constraint of specifying the inputs that a function expects defines the set of cases in which it can operate. This input takes the form of an ordered list of parameters, or arguments. Each one is defined by its name, and the type it is expected to take. These names become part of the function's scope and are not meaningful elsewhere. They do not need to be defined outside the function declaration. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
