fork download
  1. #include <cstdlib>
  2. #include <iostream>
  3. #include <conio.h>
  4. #include <windows.h>
  5. using namespace std;
  6.  
  7. int main(int argc, char *argv[])
  8. {
  9. while(true){
  10. cout<<"Input note: ";
  11. char note = getch();
  12.  
  13. if(note == 'a'){
  14. Beep(261,100);
  15. }
  16. if(note == 's'){
  17. Beep(293,100);
  18. }
  19. if(note == 'd'){
  20. Beep(329,100);
  21. }
  22. if(note == 'f'){
  23. Beep(349,100);
  24. }
  25. if(note == 'g'){
  26. Beep(392,100);
  27. }
  28. if(note == 'h'){
  29. Beep(440,100);
  30. }
  31. if(note == 'j'){
  32. Beep(493,100);
  33. }
  34. if(note == 'k'){
  35. Beep(523,100);
  36. }
  37. if(note == 'l'){
  38. Beep(587,100);
  39. }
  40. if(note == ';'){
  41. Beep(659,100);
  42. }
  43. if(note == '\''){
  44. Beep(698,100);
  45. }
  46. if(note == '\\'){
  47. Beep(784,100);
  48. }
  49.  
  50. //rebemol mibemol solbemol labemol sibemol rebemol mibemol solbemol
  51. if(note == 'w'){
  52. Beep(277,100);
  53. }
  54. if(note == 'e'){
  55. Beep(311,100);
  56. }
  57. if(note == 't'){
  58. Beep(370,100);
  59. }
  60. if(note == 'y'){
  61. Beep(415,100);
  62. }
  63. if(note == 'u'){
  64. Beep(466,100);
  65. }
  66. if(note == 'o'){
  67. Beep(554,100);
  68. }
  69. if(note == 'p'){
  70. Beep(622,100);
  71. }
  72. if(note == ']'){
  73. Beep(740,100);
  74. }
  75.  
  76. system("cls");
  77. }
  78.  
  79. return EXIT_SUCCESS;
  80. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:19: fatal error: conio.h: No such file or directory
compilation terminated.
stdout
Standard output is empty