fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int height;
  8. cin >> height;
  9. for(int i=0;i<=height;i++)
  10. for(int j=0;j<i;j++)
  11. cout << (j==i-1 ? "T\n" : "T");
  12.  
  13. for(int i=height-1;i>=0;i--)
  14. for(int j=0;j<i;j++)
  15. cout << (j==i-1 ? "T\n" : "T");
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 2856KB
stdin
4
stdout
T
TT
TTT
TTTT
TTT
TT
T