#include <iostream> 
#include <string> 
using namespace std; 
int main() { 
   int rows, cols, height;
   char trichar; 
   cout<<"Enter a character: ";
   cin >> trichar;
   cout << trichar;
   cout<< endl;
   cout << "Enter triangle height: "; 
   cin >> height; 
   cout << height; 
   cout << endl; 
   rows = 0; 
   while (rows < height) { 
      cols = 0; 
      while (cols < rows) { 
         cout << trichar; 
         cols = cols + 1; 
      } 
   rows = rows + 1;
   cout << endl; 
   } 
   return 0; 
}
