Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // LTTS - in hình tam giác đối xứng ngược
- #include <iostream>
- #include <string >
- using namespace std;
- void in(int n, char x)
- {
- for (int i = 0; i < n; i++)
- cout << x;
- }
- void main()
- {
- int n;
- cin >> n;
- for (int i = n; i>=1; i--)
- {
- in(n - 1, ' ');
- in(i, '*');
- cout << endl;
- }
- for (int i = n-1; i >=0; i--)
- {
- in(i, ' ');
- in(n-i, '*');
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement