63 206
Assignments Done
99,3%
Successfully Done
In July 2018

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
Expert's answer
#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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions