Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using std::cout;
- using std::cin;
- using std::endl;
- void main()
- {
- setlocale(LC_ALL, "Russian");
- int size, a = -1, b;
- cout << "Введите размер основания треугольника: "; cin >> size;
- while (cout << endl, a++, b = size, a < (size))
- while (((b > a) ? cout << ' ' : cout << '*'), b > 0, b--);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement