Hello guys..........Ive been programming for about a week now and I need some help.
#include <iostream.h>
Code:int main() { char state[10]; char address[10]; char name[10]; int age; char choice[4] ; do{ cout << "Please enter in the correct information\n\n\n"; cout << "State: "; cin >> state; cout << "Address: "; cin >> address; cout << "Name: "; cin >> name; cout << "Age: "; cin >> age; cout << "\n\n"; cout << "State: " << state << endl; cout << "Address: " << address << endl; cout << "Name: " << name << endl; cout << "Age: " << age << endl; cout << "Is this information correct? Yes or No: "; cin >> choice; }while(choice == "yes"); return 0; }
Looks correct doesnt it? But if you compile it with Microsoft Visual C++ it lets you enter the information for State and Address but not for name and age. Anyone know the problem? Also I want to loop untill the user types in yes. Can anyone help me with that as well. Thanks in advance.
-Jeremy