fork download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int height;
  9. cin >> height;
  10. for(int y=2*height;y>0;--y,cout<<endl)
  11. for(int x=height-abs(y-height);x>0;--x)
  12. cout<<"T";
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2856KB
stdin
4
stdout
T
TT
TTT
TTTT
TTT
TT
T