Advertisement
saluxx

fixed

Sep 9th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 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;
  17. Console.WriteLine("Welcome");
  18. Console.ResetColor();
  19. Console.WriteLine("You will be able to see a question with 3 different options");
  20. Console.WriteLine("type 1,2 or 3 depending on what the answer you believe it is.");
  21. Console.WriteLine("");
  22. Console.ForegroundColor = ConsoleColor.White;
  23. Console.WriteLine("Press any button to start the quiz");
  24. Console.ResetColor();
  25.  
  26. Console.ReadKey();
  27. Console.Clear();
  28.  
  29. Console.WriteLine("Vilken färg är en banan?");
  30. Console.WriteLine("1 Svart");
  31. Console.WriteLine("2 Gul");
  32. Console.WriteLine("3 Grön");
  33. Console.WriteLine("");
  34. string banan = Console.ReadLine();
  35. if (banan == "2")
  36. {
  37. correctanswer = 1;
  38. Console.WriteLine("Rätt Svar du fick 1 poäng");
  39. Console.Write("Du har nu: ");
  40. Console.Write(correctanswer);
  41. Console.Write(" Poäng");
  42. Console.WriteLine();
  43. Console.WriteLine("Tryck för att fortsätta");
  44. }
  45. else
  46. {
  47. correctanswer = 0;
  48. Console.WriteLine("Fel svar du fick 0 poäng");
  49. Console.WriteLine("Tryck för att fortsätta");
  50. Console.WriteLine(correctanswer);
  51. }
  52.  
  53. Console.ReadKey();
  54. Console.Clear();
  55.  
  56. Console.WriteLine("Vilken frukt gillar åsnor?");
  57. Console.WriteLine("1 Päron");
  58. Console.WriteLine("2 Äpple");
  59. Console.WriteLine("3 Drakfrukt");
  60. Console.WriteLine("");
  61. string åsnor = Console.ReadLine();
  62. if (åsnor == "3")
  63. {
  64. correctanswer1 = 1;
  65. Console.WriteLine("Rätt svar du fick 1 poäng");
  66. Console.WriteLine("Tryck för att fortsätta");
  67. Console.WriteLine(correctanswer + correctanswer1);
  68. }
  69. else
  70. {
  71. correctanswer1 = 0;
  72. Console.WriteLine("Fel svar du fick 0 poäng");
  73. Console.WriteLine("Tryck för att fortsätta");
  74. Console.WriteLine(correctanswer + correctanswer1);
  75. }
  76. Console.ReadKey();
  77. Console.Clear();
  78.  
  79. Console.WriteLine("I vilken värdsdel ligger Mosambik?");
  80. Console.WriteLine("1 Afrika");
  81. Console.WriteLine("2 Europa");
  82. Console.WriteLine("3 Sydamerika");
  83. Console.WriteLine("");
  84. string Mosambik = Console.ReadLine();
  85. if (Mosambik == "1")
  86. {
  87. correctanswer2 = 1;
  88. Console.WriteLine("Rätt svar du fick 1 poäng");
  89. Console.WriteLine("Tryck för att fortsätta");
  90. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2);
  91. }
  92. else
  93. {
  94. correctanswer2 = 0;
  95. Console.WriteLine("Fel svar du fick 0 poäng");
  96. Console.WriteLine("Tryck för att fortsätta");
  97. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2);
  98. }
  99. Console.ReadKey();
  100. Console.WriteLine();
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118. }
  119. }
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement