Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 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 Program2
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. int Punkty = 0;
  15. int NrPytania = 1;
  16.  
  17.  
  18. Console.WriteLine();
  19. Console.WriteLine("Odpowiadaj na pytania za pomoca liczb");
  20. Console.WriteLine("Liczba --- 1 --- oznacza Tak!");
  21. Console.WriteLine("Liczba --- 2 --- oznacza Nie!");
  22. Console.WriteLine();
  23.  
  24.  
  25. // PYTANIE 1
  26.  
  27. Console.WriteLine("Pytanie numer " + NrPytania);
  28. Console.WriteLine("Czy lubisz pic mleko");
  29.  
  30. ConsoleKeyInfo input = Console.ReadKey();
  31. Console.WriteLine();
  32.  
  33. Console.Write("Wpisales: {0}, ", input.KeyChar);
  34.  
  35. if (input.KeyChar == '1')
  36. {
  37. NrPytania++;
  38. Punkty++;
  39. Console.WriteLine("Odpowiedziales Tak");
  40. }
  41. else
  42. {
  43. NrPytania++;
  44. Console.WriteLine("Odpowiedziales Nie");
  45. }
  46.  
  47. // PYTANIE 2
  48.  
  49. Console.WriteLine("Pytanie numer " + NrPytania);
  50. Console.WriteLine("Czy podoba Ci sie orzech");
  51.  
  52.  
  53. Console.WriteLine();
  54.  
  55. Console.Write("Wpisales: {0}, ", input.KeyChar);
  56.  
  57. if (input.KeyChar == '1')
  58. {
  59. NrPytania++;
  60. Punkty++;
  61. Console.WriteLine("Odpowiedziales Tak");
  62. }
  63. else
  64. {
  65. NrPytania++;
  66. Console.WriteLine("Odpowiedziales Nie");
  67. }
  68.  
  69.  
  70. Console.ReadLine();
  71. }
  72. }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement