#include
#include
#include
int x,y;
char name[20],lo[20],up[20],rev[20];
main()
{
for(x=1;x<=1;x++)
{
cout<<"Enter your name:";
cin.getline(name,20);
y=name[x];
}
lo[x]=tolower(name[x]);
up[x]=toupper(name[x]);
rev[x]=name[y-x];
for(x=0;x<20;x++)
{
if(tolower(name[x]))
lo[x]=tolower(name[x]);
}
for(x=0;x<20;x++)
{
if(toupper(name[x]))
up[x]=toupper(name[x]);
}
for(x=1;x
rev[x]=name[x-y];
cout<<"\nLower case: "<
cout<<"\nUpper case is: "<
cout<<"\nReverse is: "<
getch();
}
What is wrong w/ my code the reverse character is not appear in my output.... Can you help me w/ this...
2007-03-17
02:52:34
·
3 answers
·
asked by
Anonymous