Guest User

Untitled

a guest
Apr 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication2
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. int balance = 0, treble = 0, bass = 0, volume = 0, k = 0;
  13. char s, mal = 'x';
  14. Console.Clear();
  15. while (mal == 'x')
  16. {
  17. Console.Clear();
  18. if (k == 0)
  19. Console.WriteLine("Volume \n{0}", volume);
  20. if (k == 1)
  21. Console.WriteLine("Balance \n{0}",balance);
  22. if (k == 2)
  23. Console.WriteLine("Bass \n{0}",bass);
  24. if (k == 3)
  25. Console.WriteLine("Treble \n{0}",treble);
  26. s = Convert.ToChar(Console.ReadLine());
  27. if (k == 0 && s == 'p')
  28. {
  29. volume++;
  30. if (volume == 11) volume = 10;
  31. }
  32. if (k == 0 && s == 'm')
  33. {
  34. volume--;
  35. if (volume == -1) volume = 0;
  36. }
  37. if (k == 1 && s == 'p')
  38. {
  39. balance++;
  40. if (balance == 11) balance = 10;
  41. }
  42. if (k == 1 && s == 'm')
  43. {
  44. balance--;
  45. if (balance == -1) balance = 0;
  46. }
  47. if (k == 2 && s == 'p')
  48. {
  49. bass++;
  50. if (bass == 11) bass = 10;
  51. }
  52. if (k == 2 && s == 'm')
  53. {
  54. bass--;
  55. if (bass == -1) bass = 0;
  56. }
  57. if (k == 3 && s == 'p')
  58. {
  59. treble++;
  60. if (treble == 11) treble = 10;
  61. }
  62. if (k == 3 && s == 'm')
  63. {
  64. treble--;
  65. if (treble == -1) treble = 0;
  66. }
  67. if (s == 'x')
  68. mal = 'g';
  69. if (s == 'f')
  70. {
  71. k++;
  72. if (k == 4) k = 0;
  73. }
  74. }
  75. Console.ReadKey();
  76. }
  77. }
  78. }
Add Comment
Please, Sign In to add comment