Добавить print.cpp

This commit is contained in:
2025-09-23 19:33:37 +03:00
parent 7d59b8c7e0
commit f822c5b77e

22
print.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include <iostream>
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");
}