Define and call function that will send the invitation to members of a student club. Function will accept array of members of size 10 and will print invitation card with their name at the top
#include <iostream>
using namespace std;
//Required function
void invitation(string arr[])
{
//looping through names of students in student club
for(int i=0;i<10;i++)
{
//invitation content
cout<<"Namee: "<<arr[i]<<endl;
cout<<"As a member of student club you are \ninvited to function XYZ\n";
cout<<"Venue: ABC\n\n";
}
}
int main()
{
//testing
string A[] = {"A","B","C","D","E","F","G","H","I","J"};
//calling the invitation function
invitation(A);
}
Comments
Leave a comment