Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 2D Ramiel ;(
- #include <iostream>
- using std::cout;
- using std::cin;
- using std::endl;
- void main()
- {
- setlocale(LC_ALL, "Russian");
- int a;
- char ch = '*';
- char fs = '/', bs = '\\';
- cout << "Введите размер фигуры: "; cin >> a;
- cout << endl;
- for (int i = 0; i <= a-1; i++)
- {
- for (int j = a-1; j >= i; j--)
- {
- cout << " ";
- }
- cout << fs;
- for (int j = 0; j <= i - 1; j++)
- {
- cout << " ";
- }
- for (int j = 0; j <= i - 1; j++)
- {
- cout << " ";
- }
- cout << bs;
- cout << endl;
- }
- for (int i = a-1; i >= 0; i--)
- {
- for (int j = a-1; j >= i; j--)
- {
- cout << " ";
- }
- cout << bs;
- for (int j = 0; j <= i - 1; j++)
- {
- cout << " ";
- }
- for (int j = 0; j <= i - 1; j++)
- {
- cout << " ";
- }
- cout << fs;
- cout << endl;
- }
- cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement