initial commit

This commit is contained in:
2023-07-16 13:23:25 +00:00
commit c3fa5367c3
85 changed files with 4921 additions and 0 deletions

21
C++/lesson2/task7.cpp Normal file
View File

@ -0,0 +1,21 @@
#include <iostream>
#include <string>
int main() {
std::string value = std::string();
value.reserve(9);
for (int count = 4; count >= 0; count--) {
value.clear();
for (int j = 0; j < count; j++) {
value.push_back(' ');
}
int limit = 9 - count * 2;
for (int j = 0; j < limit; j++) {
value.push_back('*');
}
for (int j = 0; j < count; j++) {
value.push_back(' ');
}
std::cout << value << '\n';
}
}