fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <time.h>
  4. char md[100],mv[100];
  5. int s,p=15,i,k,z,t;
  6. int main(){
  7. srand(file(NULL));
  8. s=rand()%22;
  9. if(s==0) md='AIST';
  10. if(s==1) md='KOZA'
  11. if(s==2) md='MAMA';
  12. if(s==3) md='PAPA';
  13. if(s==4) md='BRAT';
  14. if(s==5) md='MYLO';
  15. if(s==6) md='ROZA';
  16. if(s==7) md='KOFE';
  17. if(s==8) md='NOGA';
  18. if(s==9) md='NOTA';
  19. if(s==10) md='VAZA';
  20. if(s==11) md='BANT';
  21. if(s==12) md='SALO';
  22. if(s==13) md='SOVA';
  23. if(s==14) md='KRAN';
  24. if(s==15) md='VODA';
  25. if(s==16) md='BAYT';
  26. if(s==17) md='PILA';
  27. if(s==18) md='KOLA';
  28.  
  29. mv='____';
  30. do{
  31. printf("\n%c\nPoints %i\nVvedite bukvu: ",mv,p);
  32. scanf("%c",&k);
  33. t=0;
  34. for(i=0;i<4;i++) if(k==md[i]){
  35. mv[i]=k;
  36. t=1;
  37. z++;
  38. }
  39. if(t==0) p--;} while(p>0&&z<4);
  40. if(p==0) printf("Lose");
  41. else printf("Win");
  42. return 0;
  43. }
  44.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:9:13: warning: multi-character character constant [-Wmultichar]
 if(s==0) md='AIST';
             ^
prog.cpp:10:13: warning: multi-character character constant [-Wmultichar]
 if(s==1) md='KOZA'
             ^
prog.cpp:11:13: warning: multi-character character constant [-Wmultichar]
 if(s==2) md='MAMA';
             ^
prog.cpp:12:13: warning: multi-character character constant [-Wmultichar]
 if(s==3) md='PAPA';
             ^
prog.cpp:13:13: warning: multi-character character constant [-Wmultichar]
 if(s==4) md='BRAT';
             ^
prog.cpp:14:13: warning: multi-character character constant [-Wmultichar]
 if(s==5) md='MYLO';
             ^
prog.cpp:15:13: warning: multi-character character constant [-Wmultichar]
 if(s==6) md='ROZA';
             ^
prog.cpp:16:13: warning: multi-character character constant [-Wmultichar]
 if(s==7) md='KOFE';
             ^
prog.cpp:17:13: warning: multi-character character constant [-Wmultichar]
 if(s==8) md='NOGA';
             ^
prog.cpp:18:13: warning: multi-character character constant [-Wmultichar]
 if(s==9) md='NOTA';
             ^
prog.cpp:19:14: warning: multi-character character constant [-Wmultichar]
 if(s==10) md='VAZA';
              ^
prog.cpp:20:14: warning: multi-character character constant [-Wmultichar]
 if(s==11) md='BANT';
              ^
prog.cpp:21:14: warning: multi-character character constant [-Wmultichar]
 if(s==12) md='SALO';
              ^
prog.cpp:22:14: warning: multi-character character constant [-Wmultichar]
 if(s==13) md='SOVA';
              ^
prog.cpp:23:14: warning: multi-character character constant [-Wmultichar]
 if(s==14) md='KRAN';
              ^
prog.cpp:24:14: warning: multi-character character constant [-Wmultichar]
 if(s==15) md='VODA';
              ^
prog.cpp:25:14: warning: multi-character character constant [-Wmultichar]
 if(s==16) md='BAYT';
              ^
prog.cpp:26:14: warning: multi-character character constant [-Wmultichar]
 if(s==17) md='PILA';
              ^
prog.cpp:27:14: warning: multi-character character constant [-Wmultichar]
 if(s==18) md='KOLA';
              ^
prog.cpp:29:4: warning: multi-character character constant [-Wmultichar]
 mv='____';
    ^
prog.cpp: In function 'int main()':
prog.cpp:7:16: error: 'file' was not declared in this scope
 srand(file(NULL));
                ^
prog.cpp:7:17: error: 'srand' was not declared in this scope
 srand(file(NULL));
                 ^
prog.cpp:8:8: error: 'rand' was not declared in this scope
 s=rand()%22;
        ^
prog.cpp:9:12: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==0) md='AIST';
            ^
prog.cpp:10:12: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==1) md='KOZA'
            ^
prog.cpp:12:12: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==3) md='PAPA';
            ^
prog.cpp:13:12: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==4) md='BRAT';
            ^
prog.cpp:14:12: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==5) md='MYLO';
            ^
prog.cpp:15:12: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==6) md='ROZA';
            ^
prog.cpp:16:12: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==7) md='KOFE';
            ^
prog.cpp:17:12: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==8) md='NOGA';
            ^
prog.cpp:18:12: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==9) md='NOTA';
            ^
prog.cpp:19:13: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==10) md='VAZA';
             ^
prog.cpp:20:13: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==11) md='BANT';
             ^
prog.cpp:21:13: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==12) md='SALO';
             ^
prog.cpp:22:13: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==13) md='SOVA';
             ^
prog.cpp:23:13: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==14) md='KRAN';
             ^
prog.cpp:24:13: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==15) md='VODA';
             ^
prog.cpp:25:13: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==16) md='BAYT';
             ^
prog.cpp:26:13: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==17) md='PILA';
             ^
prog.cpp:27:13: error: incompatible types in assignment of 'int' to 'char [100]'
 if(s==18) md='KOLA';
             ^
prog.cpp:29:3: error: incompatible types in assignment of 'int' to 'char [100]'
 mv='____';
   ^
stdout
Standard output is empty