various examples of looping programs

Dec 8, 2019 at 8:11pm
give me an example of a loop program using the for , while ,or do while functions !
Last edited on Dec 8, 2019 at 8:14pm
Dec 8, 2019 at 8:32pm
1
2
3
4
5
while ( input != correct_password)
{
  cout << "Wrong password. Try again.";
  cin >> input;
}
Topic archived. No new replies allowed.