Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- using std::cout;
- using std::cin;
- using std::endl;
- void main()
- {
- setlocale(LC_ALL, "Russian");
- int size = 10, cont = 0;
- char d;
- cout << "Введите размер: "; cin >> size;
- cout << "\n";
- for (int i = 0; i <= size; i++) // вертикальная величина стрелки
- {
- for (int j = 0; j < cont - 1; j++) // горизонтальная величина стрелки
- {
- cout << "#" << " ";
- }
- (i <= size/2) ? cont++ : cont--; // строение первой части фигуры при помощи инкремента, второй - декрементом
- cout << endl;
- }
- cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement