I need to create a triangle in C++ that will take the user inputted letter (capital) and then create a triangle that will look like. I can only use nested loops NO arrays or strings
Enter a letter: F
F
FE
FED
FEDC
FEDCB
FEDCBA
here is the code i have so far i am creating a triangle but not exactly the one i require
#include <iostream>
using namespace std;
int main ()
{
char letter, last;
char row, col;
cout << "Entre a letter: ";
cin >> letter;
letter = toupper(letter);
for (row = 0; row < letter; row++)
{
for (col = 0; col <= row; col++)
cout << letter ;
last = letter;
cout << last << letter<< letter--;
cout << endl;
}
return 0;
}