Advertisement
Felanpro

project progress

May 11th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int getWhatTheyWant(); //prototype function
  8.  
  9. int main()
  10. {
  11.     int acces;
  12.  
  13.     acces = getWhatTheyWant();
  14.  
  15.     while(acces !=4)
  16.     {
  17.         acces = getWhatTheyWant();
  18.     }
  19. }
  20.  
  21. //getWhatTheyWant function
  22. int getWhatTheyWant()
  23. {
  24.     int choice;
  25.  
  26.     cout << "1: just plain items" << endl;
  27.     cout << "2: helpful items" << endl;
  28.     cout << "3: harmful items" << endl;
  29.     cout << "4: quit program" << endl;
  30.  
  31.     cin >> choice;
  32.  
  33.     return choice;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement