Написать функцию, специализированную на вывод строки из звездочек, количество которых определяется пользователем.
Решение:
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
#include «stdafx.h»
#include <iostream> #include <windows.h> using namespace std; char fun_zv(int _long) { return (‘*’); } int main() {SetConsoleCP(1251); SetConsoleOutputCP(1251); int long_s; cout<<» Введите длину строки >> «; cin>>long_s; for (int j=0; j<long_s; j++) cout<<fun_zv(j); system(«pause>>void»); return 0; } |