fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int score = 0;
  6. char answer;
  7. string red = "\033{31m\n";
  8. string green = "\033{32m\n";
  9. string yellow = "\033{33m\n";
  10. string reset= "\033{0m\n";
  11.  
  12. cout << "to bixer hati ezmune !" << endl;
  13. cout << "pirsa yekem :bersi: hevala heri delal ber dile solan" << endl;
  14. cout << "a)ahin\nb)amina\nc)pirwin\nd)hwler\n:" << endl;
  15. cout << "choose the correct answer " << endl;
  16. cin >> answer;
  17. if (answer == 'a' || answer == 'A')++score;
  18. cout << "\npirsa duyem:gula solan je hez dike ci renga?" << endl;
  19. cout << "a)sor ||nb)kesek \nc)sin\nd) spi\n" << endl;
  20. cout << "komabersive te" << endl;
  21. cin >> answer;
  22. if (answer == 'c' || answer == 'C')++score;
  23. cout << "\npirsa seyem:solan hij strane ki dike?" << endl;
  24. cout << "a)azad bedran \nb)xwce\nc)memarerat \nd)hozan dino\n" << endl;
  25. cout << "koma bersive te" << endl;
  26. cin >> answer;
  27. if (answer == 'a' || answer == 'A')++score;
  28. cout << "\koma bersive min:" << score << "out of 3\n" << endl;
  29. if (score == 3)cout << "\n her biji" << endl;
  30. else if (score == 2)cout << "zor bas" << endl;
  31. else if (score == 1)cout << "bas!\n" << endl;
  32. else cout << "tu dixwazi be careka din ceka.\n"<<endl;
  33. system("pause");
  34. return 0;
  35. }
  36.  
  37.  
Success #stdin #stdout #stderr 0.01s 5320KB
stdin
Standard input is empty
stdout
to bixer hati ezmune !
pirsa yekem :bersi: hevala heri delal ber dile solan
a)ahin
b)amina
c)pirwin
d)hwler
:
choose the correct answer 

pirsa duyem:gula solan je hez dike ci renga?
a)sor ||nb)kesek 
c)sin
d) spi

komabersive te

pirsa seyem:solan hij strane ki dike?
a)azad bedran 
b)xwce
c)memarerat 
d)hozan dino

koma bersive te
koma bersive min:0out of 3

tu dixwazi be careka din ceka.

stderr
sh: 1: pause: not found