Ok, i need to place a pause at the end of this program below where it keeps paused until a key (or enter) is pressed. Here is the program.
Code:
#include <iostream.h>
#include <string.h>
int main()
{
char name[50];
char lastname[50];
cout<<"Please enter your name: ";
cin.getline(name, 50, '\n');
if(!strcmpi("Alexander", name))
{
cout<<"That's my name too."<<endl;
}
else
{
cout<<"That's not my name.";
}
cout<<"What is your name in uppercase..."<<endl;
strupr(name);
cout<<name<<endl;
cout<<"And, your name in lowercase..."<<endl;
strlwr(name);
cout<<name<<endl;
cout<<"Your name is "<<strlen(name)<<" letters long"<<endl;
//the length of the string
cout<<"Enter your last name:";
cin.getline(lastname, 50, '\n');
strcat(name, " ");
strcat(name, lastname);
//the middle
cout<<"Your full name is "<<name;
return 0;
}
Thanks in advance for any help!!!