fork download
  1. #include <iostream>
  2. #include <array>
  3. #include <algorithm>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8.  
  9. array<int 12> count={0,0,0,0,0,0,0,0,0,0,0,0};
  10. char num;
  11. switch (num){
  12. case '1': count[1]+=1; break;
  13. case '2': count[2]+=1; break;
  14. case '3': count[3]+=1; break;
  15. case '4': count[4]+=1; break;
  16. case '5': count[5]+=1; break;
  17. case '6': count[6]+=1; break;
  18. case '7': count[7]+=1; break;
  19. case '8': count[8]+=1; break;
  20. case '9': count[9]+=1; break;
  21. case '10': count[10]+=1; break;
  22. case '11': count[11]+=1; break;
  23. case '12': count[12]+=1; break;
  24. }
  25.  
  26. cin.get();
  27. return0;
  28. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8:5: error: ‘return0’ was not declared in this scope
     return0;
     ^
stdout
Standard output is empty