diff --git a/print.cpp b/print.cpp new file mode 100644 index 0000000..5859157 --- /dev/null +++ b/print.cpp @@ -0,0 +1,22 @@ +#include +using namespace std; + +void print(int n) { + if (n == 0) { + return; + } + cout << "*"; + print(n - 1); +} + +int main() { + setlocale(0, ""); + int n; + cout << "Введiть кiлькiсть зiрок: "; + cin >> n; + + print(n); + cout << endl; + + system("pause"); +} \ No newline at end of file