Advertisement
SeasickPlatypus

Untitled

Jul 27th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. for (int x = 0; x<6; x++)
  2. {
  3.  
  4. if (x==0)
  5. {
  6. std::cout<< "input strength: " <<std::endl;
  7. std::cin >> stats[x];
  8. }
  9.  
  10. if (x==1)
  11. {
  12. std::cout<<"input dexterity: " << std::endl;
  13. std::cin >> stats[x];
  14. }
  15.  
  16. if (x==2)
  17. {
  18. std::cout<< "input inteligence: " <<std::endl;
  19. std::cin >> stats[x];
  20. }
  21.  
  22. if (x==3)
  23. {
  24. std::cout<<"input perception: " << std::endl;
  25. std::cin >> stats[x];
  26. }
  27.  
  28. if (x==4)
  29. {
  30. std::cout<< "input constitution: " << std::endl;
  31. std::cin >> stats[x];
  32. }
  33.  
  34. if (x==5)
  35. {
  36. std::cout<<"input willpower: " << std::endl;
  37. std::cin >> stats[x];
  38. }
  39.  
  40. if (stats[0] + stats[1] + stats[2] + stats[3] + stats[4] + stats[5] > 30)
  41. {
  42. std::cout<< "you used too many points." << std::endl;
  43. x= 0;
  44. for (x; x <6 ;x++)
  45. {
  46. stats[x] = 0;
  47. }
  48. x = -1;
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement