ra
Высший разум
(113233)
12 лет назад
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
char ch, di;
cout << "enter num, char, and direction" << endl
<< "(v - for vertical, any other for horizontal)" << endl << "? ";
cin >> n >> ch >> di;
string s;
s += ch;
if (di == 'v') {
s+= '\n';
}
while (n > 0) {
cout << s;
--n;
}
return 0;
}