Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication9
- {
- class Program
- {
- static void Main(string[] args)
- {
- int correctanswer = 0;
- int correctanswer1 = 0;
- int correctanswer2 = 0;
- Console.ForegroundColor = ConsoleColor.Green;
- Console.WriteLine("Welcome");
- Console.ResetColor();
- Console.WriteLine("You will be able to see a question with 3 different options");
- Console.WriteLine("type 1,2 or 3 depending on what the answer you believe it is.");
- Console.WriteLine("");
- Console.ForegroundColor = ConsoleColor.White;
- Console.WriteLine("Press any button to start the quiz");
- Console.ResetColor();
- Console.ReadKey();
- Console.Clear();
- Console.WriteLine("Vilken färg är en banan?");
- Console.WriteLine("1 Svart");
- Console.WriteLine("2 Gul");
- Console.WriteLine("3 Grön");
- Console.WriteLine("");
- string banan = Console.ReadLine();
- if (banan == "2")
- {
- correctanswer = 1;
- Console.WriteLine("Rätt Svar du fick 1 poäng");
- Console.Write("Du har nu: ");
- Console.Write(correctanswer);
- Console.Write(" Poäng");
- Console.WriteLine();
- Console.WriteLine("Tryck för att fortsätta");
- }
- else
- {
- correctanswer = 0;
- Console.WriteLine("Fel svar du fick 0 poäng");
- Console.WriteLine("Tryck för att fortsätta");
- Console.WriteLine(correctanswer);
- }
- Console.ReadKey();
- Console.Clear();
- Console.WriteLine("Vilken frukt gillar åsnor?");
- Console.WriteLine("1 Päron");
- Console.WriteLine("2 Äpple");
- Console.WriteLine("3 Drakfrukt");
- Console.WriteLine("");
- string åsnor = Console.ReadLine();
- if (åsnor == "3")
- {
- correctanswer1 = 1;
- Console.WriteLine("Rätt svar du fick 1 poäng");
- Console.WriteLine("Tryck för att fortsätta");
- Console.WriteLine(correctanswer + correctanswer1);
- }
- else
- {
- correctanswer1 = 0;
- Console.WriteLine("Fel svar du fick 0 poäng");
- Console.WriteLine("Tryck för att fortsätta");
- Console.WriteLine(correctanswer + correctanswer1);
- }
- Console.ReadKey();
- Console.Clear();
- Console.WriteLine("I vilken värdsdel ligger Mosambik?");
- Console.WriteLine("1 Afrika");
- Console.WriteLine("2 Europa");
- Console.WriteLine("3 Sydamerika");
- Console.WriteLine("");
- string Mosambik = Console.ReadLine();
- if (Mosambik == "1")
- {
- correctanswer2 = 1;
- Console.WriteLine("Rätt svar du fick 1 poäng");
- Console.WriteLine("Tryck för att fortsätta");
- Console.WriteLine(correctanswer + correctanswer1 + correctanswer2);
- }
- else
- {
- correctanswer2 = 0;
- Console.WriteLine("Fel svar du fick 0 poäng");
- Console.WriteLine("Tryck för att fortsätta");
- Console.WriteLine(correctanswer + correctanswer1 + correctanswer2);
- }
- Console.ReadKey();
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement