Guest User

Untitled

a guest
Jun 23rd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <string.h>
  4.  
  5. using namespace std;
  6.  
  7. int age;
  8. string name;
  9. int dumb = 0;
  10. int contador = 1;
  11. string question1, question2, question3, question4, question5, question6, question7;
  12.  
  13. int main(){
  14. printf("What's your age?\n");
  15. cin>>age;
  16.  
  17. if (age >= 0 || age <= 14){
  18. dumb = dumb + 5;}
  19. if (age >= 15 || age <= 24){
  20. dumb = dumb + 3;}
  21. if (age >= 25 || age <= 49){
  22. dumb = dumb + 1;}
  23. if (age >= 50 || age <= 98){
  24. dumb = dumb + 5;}
  25.  
  26. printf("What's your name?\n");
  27. cin>>name;
  28.  
  29.  
  30. printf("The test will now begin... Only answer the questions with YES or NO.\n");
  31. contador++;
  32. if (contador == 5){
  33. printf("\nThere's no reason to lie in the following questions... the result will be only yours. Be honest.\n");}
  34. printf("\nHave you complete Elementary School?\n");
  35. cin>>question1;
  36. if((strcmp (question1.c_str(),"Yes")) == 1){
  37. dumb = dumb + 0;}
  38. else{
  39. dumb = dumb + 50;}
  40.  
  41. printf("Your dumb score is: %d ", dumb);
  42.  
  43.  
  44. return 0;
  45. }
Add Comment
Please, Sign In to add comment