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