Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <time.h>
- #include <cstdlib>
- #include <conio.h>
- using namespace std;
- int main(){
- char ch;
- int a,b,c,d,e,f;
- a=0;
- b=0;
- c=0;
- do{
- int d;
- cout << "----------------AKMUO-----------------" << endl;
- _sleep(1500);
- cout << "**************POPIERIUS***************" << endl;
- _sleep(1500);
- cout << "~~~~~~~~~~~~~~~ZIRKLES~~~~~~~~~~~~~~~~" << endl;
- _sleep(1500);
- cout << " " <<endl;
- cout << " " <<endl;
- cout << " " <<endl;
- cout << "Spauskite atitinkama mygtuka:" << endl;
- cout << "Akmuo 1, Popierius 2, Zirkles 3" << endl;
- cin >> d;
- e=rand()%3+1;
- if (e==1)
- cout << "Kompiuteris pasirinko akmeni. " <<endl;
- else if (e==2) cout << "Kompiuteris pasirinko oopieriu. " <<endl;
- else if (e==3) cout << "Kompiuteris pasirinko zirkles" <<endl;
- if(d == 1 && e == 1){
- cout << "Akmuo su akmeniu. Lygiosios!" << endl;
- b++;
- }
- else if(d ==1 && e== 2){
- cout << "Popierius uzdengia akmeni, laimejo kompiuteris!" << endl;
- c++;
- }
- else if(d == 1 && e == 3){
- cout << "Akmuo nugali zirkles, tu laimi!" << endl;
- a++;
- }
- else if(d == 2 && e == 1){
- cout << "Popierius uzdengia akmeni, tu laimi!" << endl;
- a++;
- }
- else if(d == 2 && e == 2){
- cout << "Popierius su popierium. Lygiosios!" << endl;
- b++;
- }
- else if(d == 2 && e == 3){
- cout << "Zirkles sukarpo popieriu. Kompiuteris laimi!" << endl;
- c++;
- }
- else if( d == 3 && e == 1){
- cout << "Akmuo sulauzo zirkles, kompiuteris laimi!" << endl;
- c++;
- }
- else if(d == 3 && e == 2){
- cout << "Zirkles sukarpo popieriu, tu laimi!" << endl;
- a++;
- }
- else if(d == 3 && e == 3){
- cout << "Zirkles su zirklemis. Lygiosios!" << endl;
- b++;
- }
- cout << "Laimejimai: " << a << endl;
- cout << "Lygiosios: " << b << endl;
- cout << "Pralaimejimai :" << c<< endl;
- cout << " " << endl;
- cout << "Norint zaisti is naujo - spauskite raide y." << endl;
- cout << "Iseiti is zaidimo - bet kuri kita raide." <<endl;
- cin >> ch;
- system("CLS");
- }
- while(ch == 'y');
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement