rygyfygy

KPN

Nov 23rd, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdlib.h>
  3. #include <time.h>
  4. using namespace std;
  5.  
  6. int main(){
  7. cout<<"\\\\\\\\\\ KAMIEN PAPIER NOZYCE //////////\n"<<
  8. "PODAJ NUMER SYMBOLU:\n"<<
  9. "1)KAMIEN\n"<<
  10. "2)PAPIER\n"<<
  11. "3)NOZYCE\n";
  12.  
  13. int wybor;
  14. int kamien=1, papier=2, nozyce=3;
  15.  
  16. cin>>wybor;
  17.  
  18. srand(time(NULL));
  19. int komputer = (rand() % 3) + 1;
  20.  
  21. if (wybor==komputer)
  22. cout<<"remis";
  23. if wybor==kamien
  24. switch(komputer)
  25. {
  26. case papier:
  27. //jakiś kod
  28. break;
  29.  
  30.  
  31.  
  32.  
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment