Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "ru");
- int size;
- cout << "Введите размер фигуры (нечетное число): ";
- cin >> size;
- for (int i = 0; i < size; i++) {
- for (int j = 0; j < size; j++) {
- if (i == j || j == size / 2 || i == size / 2 || i == size - j - 1) {
- cout << " * ";
- }
- else {
- cout << " ";
- }
- }
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment