Answer to Question #43958 in C for mnb

Question #43958
write a c program on menu driven which has name and password for logins and asks retype password and store it
1
Expert's answer
2014-07-07T16:02:28-0400
#include <iostream>
int main() {
std::string login;
int password;
char choice;
while ( true ) {
std::cout << "Please enter your login" << std::endl;
std::cin >> login;
std::cout << "Please enter the numeric password" << std::endl;
std::cin >> password;
std::cout << "Would you like to re-enter? N or n for yes" << std::endl;
std::cin >> choice;
if ( choice == 'n' || choice =='N' ) {
break;
}
}
}

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
New on Blog
APPROVED BY CLIENTS