Advertisement
Guest User

Untitled

a guest
May 23rd, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. //Joe is gay
  2. #include<iostream>
  3. #include<string>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. bool game = true;
  10. string my_string = "Pineapple";
  11. int guess;
  12. int str_length = my_string.length() + 1;
  13.  
  14. cout << "The goal of this game is to enter the EXACT length of the string given. In this case, you are given the string " << my_string << ". Godspeed." << endl;
  15. cout << "Please enter the EXACT length of the given string... \n";
  16. cin >> guess;
  17.  
  18.  
  19. while (game) {
  20.  
  21. if (guess == str_length) {
  22.  
  23. cout << "You're a fucking wizard! Congratu-fucking-lations, you won!" << endl;
  24. game = false;
  25. }
  26.  
  27. else if (guess != str_length) {
  28.  
  29. str_length += guess;
  30.  
  31. cout << "Do you not know how to count?!" << endl;
  32. cout << "Please try again... \n";
  33.  
  34. cin >> guess;
  35. }
  36.  
  37. else;
  38.  
  39.  
  40.  
  41. }
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement