fork download
  1. // Example program
  2. #include <iostream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. const int questionsCount = 2;
  8. const int questionSize = 4;
  9.  
  10. int main()
  11. {
  12. int answerNum;
  13. int correctAnswers [questionsCount] = {1,1}; //номера правильніх ответов на вопрос.
  14. string questions [questionsCount * questionSize] = {"Девственник?", "Да", "Нет", "Не знаю", "Хуи сосал?", "Да", "Нет", "Не знаю"};
  15.  
  16. for (int i = 0; i < questionsCount; i++)
  17. {
  18. cout << questions [i * questionSize] << endl << questions [i * questionSize + 1] << endl << questions [i * questionSize + 2] << endl << questions [i * questionSize + 3] << endl;
  19. cin >> answerNum;
  20.  
  21. if (correctAnswers [i] == answerNum)
  22. cout << "Correct" << endl;
  23. else
  24. cout << "Incorrect" << endl;
  25. }
  26.  
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0s 3468KB
stdin
1
1
stdout
Девственник?
Да
Нет
Не знаю
Correct
Хуи сосал?
Да
Нет
Не знаю
Correct