lab-5 (1).txt - = Lab 5 = Goals = Write programs with...

This preview shows 1 out of 2 pages.

===== Lab 5 ===== Goals ===== - Write programs with conditional behavior. Secrets ======= Name the source file for this section secret.cpp. You are going to write a program that contains secrets inside, and will only output the secrets if the user enters the correct password and knows what secrets to ask for. The first thing the program should do is ask the user for a password. If the password isn't == "Liverpool", then output "Unauthorized, goodbye" on a new line and exit the program. Otherwise the program should continue to the next part. At this point the user entered a correct password. Next, ask the user to enter a topic they would like to see secret information about. The following shows what secret should be output (right column) when they enter one of the topics in the left column:: google Password123 facebook MyLittlePony! PIN 1234 SSN 555-55-5555 If the user enters any topic besides the one shown, output "Invalid topic, goodbye" and exit the program.
Image of page 1

Subscribe to view the full document.

Image of page 2
You've reached the end of this preview.
  • Spring '14
  • source file

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern