SlideShare a Scribd company logo
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
int count=1;
int scorex=0;
int scorey=0;
while(count<=5)
{
char x,y;
cout<<"Shaila Entertainment"<<endl;
cout<<"Presents"<<endl;
cout<<"Rock, Paper, or Scissors?"<<endl;
cout<<"INSTRUCTIONS: input r for rock, p for paper and s for
scissors."<<endl;
cout<<"Player 1's turn."<<endl;
cin>>x;
cout<<"Player 2's turn."<<endl;
cin>>y;
if((x=='r')&&(y=='p'))
{
cout<<"Player 2 wins!"<<endl;
scorey=scorey++;
cout<<"Player 1 : " ;
cout<<scorex<<endl;
cout<<"Player 2 : ";
cout<<scorey<<endl;
}
else if((x=='r')&&(y=='s'))
{
cout<<"Player 1 wins!"<<endl;
scorex=scorex++;
cout<<"Player 1 : " ;
cout<<scorex<<endl;
cout<<"Player 2 : ";
cout<<scorey<<endl;
}
else if((x=='p')&&(y=='r'))
{
cout<<"Player 1 wins!"<<endl;
scorex=scorex++;
cout<<"Player 1 : " ;
cout<<scorex<<endl;
cout<<"Player 2 : ";
cout<<scorey<<endl;
}
else if((x=='p')&&(y=='s'))
{
cout<<"Player 2 wins!"<<endl;
scorey=scorey++;
cout<<"Player 1 : " ;
cout<<scorex<<endl;
cout<<"Player 2 : ";
cout<<scorey<<endl;
}
else if((x=='s')&&(y=='r'))
{
cout<<"Player 2 wins!"<<endl;
scorey=scorey++;
cout<<"Player 1 : " ;
cout<<scorex<<endl;
cout<<"Player 2 : ";
cout<<scorey<<endl;
}
else if((x=='s')&&(y=='p'))
{
cout<<"Player 1 wins!"<<endl;
scorex=scorex++;
cout<<"Player 1 : " ;
cout<<scorex<<endl;
cout<<"Player 2 : ";
cout<<scorey<<endl;
}
else if(x=y)
{
cout<<"It's a DRAW!!!"<<endl;
cout<<"Player 1 : " ;
cout<<scorex<<endl;
cout<<"Player 2 : ";
cout<<scorey<<endl;
}
else
{
cout<<"Input Invalid";
}
count++;
}
getch();
return 0;
}

More Related Content

PDF
The Ring programming language version 1.5.2 book - Part 52 of 181
PDF
Torneo baloncesto
PDF
Empowering End-users to Find Point-of-interests with a Public Display
PPTX
New Tools for a More Functional C++
DOCX
Key codes
PDF
Anadhikar-probesh-Robindranath_Thakur
TXT
Readme
The Ring programming language version 1.5.2 book - Part 52 of 181
Torneo baloncesto
Empowering End-users to Find Point-of-interests with a Public Display
New Tools for a More Functional C++
Key codes
Anadhikar-probesh-Robindranath_Thakur
Readme

What's hot (18)

PDF
201707 CSE110 Lecture 13
TXT
Bubble archery game(c program)
TXT
Video club consulta
PDF
The Ring programming language version 1.5.2 book - Part 51 of 181
PDF
The Future of JavaScript (SXSW '07)
PDF
[KOSSA] C++ Programming - 18th Study - STL #4
PPTX
Snake in the DOM!
PDF
Family Office White Paper: ETF Strategies
PDF
Replica Sets
DOCX
Save game function
PDF
The Ring programming language version 1.3 book - Part 41 of 88
TXT
C code
PDF
Storybird resource part_2
PDF
watchOS 2でゲーム作ってみた話
PDF
PyCon2009_AI_Alt
PDF
Writing ashram presentation-conference-presentation
DOCX
hean ponreay
PDF
Alphabet free-worksheets
201707 CSE110 Lecture 13
Bubble archery game(c program)
Video club consulta
The Ring programming language version 1.5.2 book - Part 51 of 181
The Future of JavaScript (SXSW '07)
[KOSSA] C++ Programming - 18th Study - STL #4
Snake in the DOM!
Family Office White Paper: ETF Strategies
Replica Sets
Save game function
The Ring programming language version 1.3 book - Part 41 of 88
C code
Storybird resource part_2
watchOS 2でゲーム作ってみた話
PyCon2009_AI_Alt
Writing ashram presentation-conference-presentation
hean ponreay
Alphabet free-worksheets
Ad

Recently uploaded (20)

PDF
Digital Strategies for Manufacturing Companies
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Introduction to Artificial Intelligence
PDF
System and Network Administraation Chapter 3
PDF
medical staffing services at VALiNTRY
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
top salesforce developer skills in 2025.pdf
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
assetexplorer- product-overview - presentation
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Digital Strategies for Manufacturing Companies
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
wealthsignaloriginal-com-DS-text-... (1).pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Introduction to Artificial Intelligence
System and Network Administraation Chapter 3
medical staffing services at VALiNTRY
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Which alternative to Crystal Reports is best for small or large businesses.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
Digital Systems & Binary Numbers (comprehensive )
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PTS Company Brochure 2025 (1).pdf.......
top salesforce developer skills in 2025.pdf
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
assetexplorer- product-overview - presentation
L1 - Introduction to python Backend.pptx
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Ad

DEV C++

  • 1. #include <iostream> #include <conio.h> using namespace std; int main() { int count=1; int scorex=0; int scorey=0; while(count<=5) { char x,y; cout<<"Shaila Entertainment"<<endl; cout<<"Presents"<<endl; cout<<"Rock, Paper, or Scissors?"<<endl; cout<<"INSTRUCTIONS: input r for rock, p for paper and s for scissors."<<endl; cout<<"Player 1's turn."<<endl; cin>>x; cout<<"Player 2's turn."<<endl; cin>>y; if((x=='r')&&(y=='p')) { cout<<"Player 2 wins!"<<endl; scorey=scorey++; cout<<"Player 1 : " ; cout<<scorex<<endl; cout<<"Player 2 : "; cout<<scorey<<endl; } else if((x=='r')&&(y=='s')) { cout<<"Player 1 wins!"<<endl; scorex=scorex++; cout<<"Player 1 : " ; cout<<scorex<<endl; cout<<"Player 2 : "; cout<<scorey<<endl; } else if((x=='p')&&(y=='r')) { cout<<"Player 1 wins!"<<endl; scorex=scorex++; cout<<"Player 1 : " ; cout<<scorex<<endl; cout<<"Player 2 : "; cout<<scorey<<endl; } else if((x=='p')&&(y=='s')) { cout<<"Player 2 wins!"<<endl; scorey=scorey++; cout<<"Player 1 : " ; cout<<scorex<<endl; cout<<"Player 2 : "; cout<<scorey<<endl; } else if((x=='s')&&(y=='r')) { cout<<"Player 2 wins!"<<endl; scorey=scorey++; cout<<"Player 1 : " ; cout<<scorex<<endl; cout<<"Player 2 : "; cout<<scorey<<endl;
  • 2. } else if((x=='s')&&(y=='p')) { cout<<"Player 1 wins!"<<endl; scorex=scorex++; cout<<"Player 1 : " ; cout<<scorex<<endl; cout<<"Player 2 : "; cout<<scorey<<endl; } else if(x=y) { cout<<"It's a DRAW!!!"<<endl; cout<<"Player 1 : " ; cout<<scorex<<endl; cout<<"Player 2 : "; cout<<scorey<<endl; } else { cout<<"Input Invalid"; } count++; } getch(); return 0; }