478,758 views
13 votes
13 votes
. a program contains the following function. void display(int arg1, double arg2, char arg3) { cout << "here are the values: " << arg1 << " " << arg2 << " " << arg3 << endl; } write a statement that calls the procedure and passes the following variables to it: int age; double income; char initial;

User Oskar Eriksson
by
2.9k points

1 Answer

8 votes
8 votes

#include <iostream>

void display(int arg1, double arg2, char arg3) {

std::cout << "here are the values: " << arg1

<< ", " << arg2

<< ", " << arg3 << std::endl;

}

int main() {

int age; double income; char initial;

std::cout << "Enter your age: "; std::cin>>age;

std::cout << "Enter your income: "; std::cin>>income;

std::cout << "Enter your initial: "; std::cin>>initial;

//Send these datas into the display()

display(age,income,initial);

return 0;

}

User Selma
by
2.4k points