fork download
  1. #include"stdafx.h"
  2. #include<iostream>
  3. #include<stdio.h>
  4. usingnamespace std;
  5.  
  6. int_tmain(intargc, _TCHAR* argv[])
  7. {
  8. int a[10],i,j,max;
  9. char l;
  10. l = 'k';
  11. for (i = 0; i <= 9; i++)
  12. {
  13. a[i] = 0;
  14. }
  15. while (l!='.')
  16. {
  17. cin>>l ;
  18. a[l-48]++;
  19.  
  20. }
  21. max = a[0];
  22. for (i = 1; i<=9; i++)
  23. {
  24. if (a[i]>max)
  25. {
  26. max = a[i];
  27. }
  28. }
  29. for (i = 1; i<= max; i++)
  30. {
  31. for (j = 0; j <= 9; j++)
  32. {
  33. if (a[j] == i)
  34. {
  35. cout << j;
  36. }
  37. }
  38. }
  39.  
  40. return 0;
  41. }
  42.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:19: fatal error: stdafx.h: No such file or directory
 #include"stdafx.h"
                   ^
compilation terminated.
stdout
Standard output is empty