Answer to Question #26342 in C++ for okari justine

Question #26342
write a menu driven program in c++ that captures details of a customer in a bank.
1
Expert's answer
2013-03-14T10:30:42-0400
#include < iostream >
# include <string>
using namespace std;


void main() {


string name[10], sur[10];
double mon[10];
int i=0;
while(true){
cout<<"Enter name: ";
cin.ignore();
getline (cin,name[i],'
');
if (name[i]=="") break;
cout<<"Enter surname: ";
cin.ignore();
getline (cin,sur[i],'
');
cout<<"Enter amount of money: ";
cin>>mon[i];
i++;
}
for (int j=0;j<i;j++){
cout<<name[j]<<" "<<sur[j]<<" "<<mon[j]<<endl;
}


system("PAUSE");
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS