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 Toci.Training.MichalJ
- {
- class quiz
- {
- public static void codingQuiz()
- {
- Console.WriteLine("Witaj w quizie dla kandydatow na programistow.");
- Console.ReadKey();
- Console.WriteLine();
- Console.WriteLine("Oto pytania: ");
- string[] questionsBase = new string[]
- {
- "1. blablabla",
- "2. bablabl",
- "3. blablaba",
- "4. blabla",
- "5. bablabla",
- "6. blablbla"
- };
- string[][] answersBase = new string[questionsBase.Length][];
- answersBase[0] = new string[]
- {
- "a) dadda",
- "b) fasfsa ",
- "c) safsfsaf",
- "d) safsafsaf"
- };
- answersBase[1] = new string[]
- {
- "a) ",
- "b) ",
- "c) ",
- "d) "
- };
- answersBase[2] = new string[]
- {
- "a) ",
- "b) ",
- "c) ",
- "d) "
- };
- answersBase[3] = new string[]
- {
- "a) ",
- "b) ",
- "c) ",
- "d) "
- };
- answersBase[4] = new string[]
- {
- "a) ",
- "b) ",
- "c) ",
- "d) "
- };
- answersBase[5] = new string[]
- {
- "a) ",
- "b) ",
- "c) ",
- "d) "
- };
- char odp;
- for (int i = 0; i < questionsBase.Length; i++)
- {
- Console.WriteLine(questionsBase[i]);
- Console.WriteLine();
- for (int j = 0; j < answersBase[i].Length; j++)
- Console.WriteLine(answersBase[i][j]);
- if (i == 0 && i == 4)
- {
- Console.WriteLine();
- Console.WriteLine("Podaj odpowiedz: ");
- odp = (char) Console.Read();
- switch (odp)
- {
- case 'a':
- {
- Console.WriteLine("Zla odpowiedz");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- case 'b':
- {
- Console.WriteLine("Zla odpowiedz");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- case 'c':
- {
- Console.WriteLine("Dobrze!");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- case 'd':
- {
- Console.WriteLine("Zla odpowiedz");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- default:
- {
- Console.WriteLine("Podaj odpowiedz a, b, c lub d");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- }
- }
- if (i == 3 && i == 5)
- {
- Console.WriteLine();
- Console.WriteLine("Podaj odpowiedz: ");
- odp = (char) Console.Read();
- switch (odp)
- {
- case 'a':
- {
- Console.WriteLine("Dobrze!");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- case 'b':
- {
- Console.WriteLine("Zla odpowiedz");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- case 'c':
- {
- Console.WriteLine("Zla odpowiedz");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- case 'd':
- {
- Console.WriteLine("Zla odpowiedz");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- default:
- {
- Console.WriteLine("Podaj odpowiedz a, b, c lub d");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- }
- }
- if (i == 1)
- {
- Console.WriteLine();
- Console.WriteLine("Podaj odpowiedz: ");
- odp = (char) Console.Read();
- switch (odp)
- {
- case 'a':
- {
- Console.WriteLine("Zla odpowiedz");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- case 'b':
- {
- Console.WriteLine("Zla odpowiedz");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- case 'c':
- {
- Console.WriteLine("Zla odpowiedz");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- case 'd':
- {
- Console.WriteLine("Dobrze!");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- default:
- {
- Console.WriteLine("Podaj odpowiedz a, b, c lub d");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- }
- }
- if (i == 2)
- {
- Console.WriteLine();
- Console.WriteLine("Podaj odpowiedz: ");
- odp = (char) Console.Read();
- switch (odp)
- {
- case 'a':
- {
- Console.WriteLine("Zla odpowiedz");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- case 'b':
- {
- Console.WriteLine("Dobrze!");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- case 'c':
- {
- Console.WriteLine("Zla odpowiedz");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- case 'd':
- {
- Console.WriteLine("Zla odpowiedz");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- default:
- {
- Console.WriteLine("Podaj odpowiedz a, b, c lub d");
- Console.WriteLine();
- Console.ReadKey();
- break;
- }
- }
- }
- Console.ReadKey();
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement