Hi,
I'm trying to print my name in reverse and in capital letters. I got this far and I am almost certain this is correct, but when I compile I get a bunch of numbers and not my name.
Can anyone give me hand please?
Code:#pragma hdrstop #include<iostream> #include<conio> using namespace std; using std::toupper; //--------------------------------------------------------------------------- #include<string.h> #pragma argsused int main() { char name[] = {"Jason"}; int character; character = strlen(name); for (int i = strlen(name); i >= 0; i--) { character = name[i]; character = toupper(character); cout << character; } getch(); return 0; }



LinkBack URL
About LinkBacks


