- #include<iostream>
- #include<ctime>
- using namespace std;
- int main()
- {
- srand(time(NULL));
- int p,c;
- cout<<"ROCK PAPER SCISSORS 1v1 WITH PC!!"<<endl;
- string n[]={"Rock!","Paper!","Scissors!"};
- cout<<"Rock Paper Scissors! (1)Rock (2)Paper (3)Scissors";
- cin>>p;
- c=rand()%3+1;
- cout<<"You picked: "<<n[p-1]<<endl;
- cout<<"The PC Picked: "<<n[c-1]<<endl;
- system("pause");
- return 0;
- }
複製代碼 |