Advertisement
saluxx

Fixed 2

Sep 9th, 2015
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.47 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication9
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int correctanswer = 0;
  14. int correctanswer1 = 0;
  15. int correctanswer2 = 0;
  16. Console.ForegroundColor = ConsoleColor.Green; // Ändra färg
  17. Console.WriteLine("Welcome");
  18. Console.ResetColor(); // Reseta färgen
  19. Console.WriteLine();
  20. Console.ForegroundColor = ConsoleColor.White;
  21. Console.WriteLine("You will be able to see a question with 3 different options");
  22. Console.WriteLine("type 1,2 or 3 depending on what the answer you believe it is.");
  23. Console.WriteLine();
  24. Console.Write("Correct answer = ");
  25. Console.ForegroundColor = ConsoleColor.Magenta;
  26. Console.Write("1");
  27. Console.ForegroundColor = ConsoleColor.White;
  28. Console.WriteLine(" Point");
  29. Console.WriteLine();
  30. Console.Write("Uncorrect answer = ");
  31. Console.ForegroundColor = ConsoleColor.Magenta;
  32. Console.Write("0");
  33. Console.ForegroundColor = ConsoleColor.White;
  34. Console.Write(" Points");
  35. Console.ResetColor();
  36. Console.WriteLine(); // Hoppar ner 1 rad
  37. Console.WriteLine();
  38. Console.WriteLine("Press any button to start the quiz");
  39.  
  40. Console.ReadKey();
  41. Console.Clear();
  42.  
  43. Console.WriteLine("What color is a banana?");
  44. Console.WriteLine("1 Black");
  45. Console.WriteLine("2 Yellow");
  46. Console.WriteLine("3 Green");
  47. Console.WriteLine("");
  48. string banan = Console.ReadLine();
  49. if (banan == "2")
  50. {
  51. correctanswer = 1;
  52. Console.WriteLine();
  53. Console.Write("The Right Answer is 2");
  54. Console.ForegroundColor = ConsoleColor.Yellow;
  55. Console.Write(" Yellow");
  56. Console.ResetColor();
  57. Console.WriteLine();
  58. Console.Write("Your Points: ");
  59. Console.ForegroundColor = ConsoleColor.Magenta;
  60. Console.Write(correctanswer);
  61. Console.ResetColor();
  62. Console.WriteLine();
  63. Console.WriteLine();
  64. Console.WriteLine("Press any button to continue");
  65. }
  66.  
  67. else
  68.  
  69. {
  70. correctanswer = 0;
  71. Console.Write("The Right Answer is 2");
  72. Console.ForegroundColor = ConsoleColor.Yellow;
  73. Console.Write(" Yellow");
  74. Console.ResetColor();
  75. Console.WriteLine();
  76. Console.Write("Your Points: ");
  77. Console.ForegroundColor = ConsoleColor.Magenta;
  78. Console.Write(correctanswer);
  79. Console.ResetColor();
  80. Console.WriteLine();
  81. Console.WriteLine();
  82. Console.WriteLine("Press any button to continue");
  83. }
  84.  
  85. Console.ReadKey();
  86. Console.Clear();
  87.  
  88. Console.WriteLine("Who created Minecraft?");
  89. Console.WriteLine("1 Adam Persson");
  90. Console.WriteLine("2 Lukas Persson");
  91. Console.WriteLine("3 Markus Persson");
  92. Console.WriteLine("");
  93. string minecraft = Console.ReadLine();
  94. if (minecraft == "3")
  95. {
  96. correctanswer1 = 1;
  97. Console.WriteLine();
  98. Console.WriteLine("The Right Answer is 3 Markus Persson");
  99. Console.Write("Your Points: ");
  100. Console.ForegroundColor = ConsoleColor.Magenta;
  101. Console.WriteLine(correctanswer + correctanswer1);
  102. Console.ResetColor();
  103. Console.WriteLine();
  104. Console.WriteLine("Press any button to continue");
  105.  
  106. }
  107.  
  108. else
  109.  
  110. {
  111. correctanswer1 = 0;
  112. Console.WriteLine("The Right Answer is 3 Markus Persson");
  113. Console.Write("Your Points: ");
  114. Console.ForegroundColor = ConsoleColor.Magenta;
  115. Console.WriteLine(correctanswer + correctanswer1);
  116. Console.ResetColor();
  117. Console.WriteLine();
  118. Console.WriteLine("Press any button to continue");
  119. }
  120. Console.ReadKey();
  121. Console.Clear();
  122.  
  123. Console.WriteLine("In which continent is Moçambique located?");
  124. Console.WriteLine("1 Africa");
  125. Console.WriteLine("2 Europe");
  126. Console.WriteLine("3 South America");
  127. Console.WriteLine("");
  128. string Mosambik = Console.ReadLine();
  129. if (Mosambik == "1")
  130. {
  131. correctanswer2 = 1;
  132. Console.WriteLine();
  133. Console.WriteLine("The Right Answer is 1 Africa");
  134. Console.Write("Your Points: ");
  135. Console.ForegroundColor = ConsoleColor.Magenta;
  136. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2);
  137. Console.ResetColor();
  138. Console.WriteLine();
  139. Console.WriteLine("Press any button to continue");
  140.  
  141. }
  142.  
  143. else
  144.  
  145. {
  146. correctanswer2 = 0;
  147. Console.WriteLine();
  148. Console.WriteLine("The Right Answer is 1 Africa");
  149. Console.Write("Your Points: ");
  150. Console.ForegroundColor = ConsoleColor.Magenta;
  151. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2);
  152. Console.ResetColor();
  153. Console.WriteLine();
  154. Console.WriteLine("Press any button to continue");
  155. }
  156.  
  157. Console.ReadKey();
  158. Console.Clear();
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178. Console.ReadKey();
  179. Console.WriteLine();
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197. }
  198. }
  199. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement