Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <iostream>
  3. #include <conio.h>
  4. #include <windows.h>
  5. #include "pch.h"
  6. using namespace std;
  7.  
  8. int main(int argc, char *argv[])
  9. {
  10. while (true) {
  11. cout << "Input note: ";
  12. char note = getch();
  13.  
  14. if (note == 'a') {
  15. Beep(261, 100);
  16. }
  17. if (note == 's') {
  18. Beep(293, 100);
  19. }
  20. if (note == 'd') {
  21. Beep(329, 100);
  22. }
  23. if (note == 'f') {
  24. Beep(349, 100);
  25. }
  26. if (note == 'g') {
  27. Beep(392, 100);
  28. }
  29. if (note == 'h') {
  30. Beep(440, 100);
  31. }
  32. if (note == 'j') {
  33. Beep(493, 100);
  34. }
  35. if (note == 'k') {
  36. Beep(523, 100);
  37. }
  38. if (note == 'l') {
  39. Beep(587, 100);
  40. }
  41. if (note == ';') {
  42. Beep(659, 100);
  43. }
  44. if (note == '\'') {
  45. Beep(698, 100);
  46. }
  47. if (note == '\\') {
  48. Beep(784, 100);
  49. }
  50.  
  51. if (note == 'z') {
  52. Beep(277, 100);
  53. }
  54. if (note == 'x') {
  55. Beep(311, 100);
  56. }
  57. if (note == 'c') {
  58. Beep(370, 100);
  59. }
  60. if (note == 'v') {
  61. Beep(415, 100);
  62. }
  63. if (note == 'b') {
  64. Beep(466, 100);
  65. }
  66. if (note == 'n') {
  67. Beep(554, 100);
  68. }
  69. if (note == 'm') {
  70. Beep(622, 100);
  71. }
  72. if (note == ',') {
  73. Beep(740, 100);
  74. }
  75.  
  76. system("c ls");
  77.  
  78. }
  79. return 0;
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement