Hey I'm really new to c++ and am currently frustrated and at wits end on how to print a character beside each other instead of below it after asking input from user. This is what i got so far ---
#include <iostream>
using namespace std;
int main() {
int posNumber;
char letter;
cout << "Please enter a positive integer";
cin >> posNumber;
cout << "Please enter a character";
cin >> letter;
for (int i = 1; i <= posNumber; i++)
{
cout << letter <<
endl;
}
system("PAUSE");
return 0;
}
//unfortunately this prints the character entered below each other rather than beside. Any tips or help would help me immensely and prevent me from loosing my mind
you wouldn't also know how for this program. To use a new variable to count up to 10 characters and then start printing on a new line, but does not require that you add loops. you do have to set the count variable back to zero when print out a newline character. I'm having difficulty incorporating the count variable. I understand if you do not want to spend anymore time working on this. Thank-you for the help you did provide
so it looks something like this for every integer entered over 10 it prints on the next line
please enter a positive integer: 32
please enter a character: +