Hi I am new to C++ and I'm still at the learning stage.
I have been racking my brains on this program, Pascal's Triangle using letters.
e.g:
F
FE
FED
FEDC
FEDCB
FEDCBA
I have the code worked out but I get ASCII characters instead of letters.
If some one can just point me in the right direction that would be great.
Code:#include<iostream> using namespace std; int main() { int col, row; char lett; cout << "Please enter letter: "; cin >> lett; for (col = 0; col <= 6; col++) { for (lett = 0; lett <= col; lett++) cout << lett; cout << endl; } system ("PAUSE"); return 0; }



2Likes
LinkBack URL
About LinkBacks



