C++ function with two parametre

Hello cPlusPlus'

I'm having trouble to make a program that can do the following:

In short - a function with 2 parameters. 1 Int, 1 Char.

If the user enters a number from 1-80 my Char variable print an entire line of his letter.
If you enter a number above 80, the program will only print the text "No Char"

Its pretty closed to this one, but i need to use parameters

int b;
char a;

void show_func(void)
{
if(b>80)
cout << "No CHAR \n " << endl;

if(b<=80)
cout << a;

}



void main(void)
{
cout << " 1-100 \n\n " << endl;
cin >> b;
cout << " letter \n\n " << endl;
cin >> a;


show_func();
well its kind of hard for a function to have parameters if its void
Try putting a and b into show_func as parameters and change the return type of that function.
Topic archived. No new replies allowed.