Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- using std::cout;
- using std::cin;
- using std::endl;
- int main()
- {
- //Arrow
- /*for (int i = size; i >= 0; cout << endl, i--) for (int j = (size - 1 - 2 * i < 0) ? size - 1 - i : i; j >= 0; cout << '*', j--);*/
- //Square
- /*for (int size = (cout << "Введите размер: ", cin >> size, size), i = 0; i < size; i++, cout << endl) for (int j = 0; j < size; j++, cout << '*' << " ");*/
- //Triangle-1
- /*for (int size = (cout << "Введите размер: ", cin >> size, size), i = 0; i < size; i++, cout << endl) for (int j = 0; j <= i; j++, cout << '*' << " ");*/
- //Triangle-2
- /*for (int size, i = (cout << "Введите размер: ", cin >> size, size); i > 0; i--, cout << endl) for (int j = 0; j < i; j++, cout << '*' << " ");*/
- //Triangle-3
- /*for (int size = (cout << "Введите размер: ", cin >> size, size), i = 0; i < size; i++, cout << endl) for (int j = 0; j < size; ((j < i) ? cout << " " : cout << '*'), cout << " ", j++);*/
- //Triangle-4
- /*for (int size, i = (cout << "Введите размер: ", cin >> size, size - 1); i >= 0; i--, cout << endl) for (int j = 0; j < size; ((j < i) ? cout << " " : cout << '*'), cout << " ", j++);*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement