fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. int degree;
  7. string response;
  8.  
  9. cout << "Please enter your degree: ";
  10. cin >> degree;
  11.  
  12. if (degree >= 140) {
  13. cout << "Congratulations, genius! You're clearly on another level.\n";
  14. }
  15. else if (degree <= 100) {
  16. cout << "\nHmm... that's unfortunate.\n";
  17. cout << "Repeat after me (type exactly): I am a stupid\n";
  18. cin.ignore(); // لحل مشكلة الإدخال من سطر جديد
  19. getline(cin, response);
  20.  
  21. if (response == "I am a stupid") {
  22. cout << "Good. Acceptance is the first step toward improvement.\n";
  23. } else {
  24. cout << "You can't even follow simple instructions. Seek help.\n";
  25. }
  26. }
  27. else {
  28. cout << "You're okay... not great, not terrible.\n";
  29. cout << "Mediocrity is a choice. You can do better.\n";
  30. }
  31.  
  32. return 0;
  33. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
Please enter your degree: 
Hmm... that's unfortunate.
Repeat after me (type exactly): I am a stupid
You can't even follow simple instructions. Seek help.