Advertisement
saluxx

FInalyl working woooooooooooo

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