Upload
avneet-kaur
View
216
Download
0
Embed Size (px)
Citation preview
8/18/2019 Computer Program-ODD EVEN
1/11
NAME: ISWARJOT
SINGH
CLASS: XII – A
ROLL NO. : 24
COMPUTER SCIENCE
PROJECT FILE
ODD –EVEN
8/18/2019 Computer Program-ODD EVEN
2/11
CERTIFICATE
This is to certify that the project namedODDEVEN has been made by Ishwa!"#
S$%&h of Class XII'A of G(( T)&h
*aha+( , + C)%#)%a- Sh""/ as a part of
their curriculum for subject ComputerScience.
Teacher’s Signature
8/18/2019 Computer Program-ODD EVEN
3/11
ACKNOWLEDGEMENT
n performing this assignment! had to ta"ethe help and guideline of some respected
persons! #ho deser$e my greatest gratitude.
The completion of this assignment gi$es me
much %leasure. #ould li"e to sho# my
gratitude M. Ash$sh 0(%wa1 C"(s)I%s#(#" "2 C"34(#) S$)%)1 G(( T)&h
*aha+( , + C)%#)%a- Sh""/ #ho introduced
me to the ðodology of #or"! and #hose
passion for the 'underlying structures( had
lasting effect ) for gi$ing me a good guideline
for assignment throughout numerous
consultations. #ould also li"e to e*pand my
deepest gratitude to all those #ho ha$e
directly and indirectly guided me in #riting this
assignment.
&any people! especially my classmates! ha$e
made $aluable comment suggestions on this
proposal #hich ga$e me an inspiration to
impro$e my assignment. than" all the people
8/18/2019 Computer Program-ODD EVEN
4/11
for their help directly and indirectly to
complete my assignment.
About The
ProjectThe programme odd e$en is based on theprinciples of the game 'ODD+EVEN( also "no#n
as finger cric"et in #hich , people use their
hands to sho# gestures of nos. from - to . n
this one of them is bo#ler and the other one is
batsman in #hich both the player simultaneously
sho# their gestures and if the no. /epresented
by their gesture is same then the batsman is
out other#ise it continues till their gestures
are same. The gesture represented by thebatsman is the no. of runs scored by him and till
the time he is out the total runs are the sums
of the numbers represented by his gestures.
8/18/2019 Computer Program-ODD EVEN
5/11
Similarly once the player - is out player , is no#
the batsman and player - the bo#ler. The player
#hose no. of runs is more at the end is the#inner of the game.
Program#include#include#include#include#include#includestruct cric{
int runs;char name[20];}s[10];
oid main!"{char ch1;
int posnchnumbo$l%ag&0;oid randomi'e!";randomi'e;do{a(clrscr!";cout
8/18/2019 Computer Program-ODD EVEN
6/11
cout
8/18/2019 Computer Program-ODD EVEN
7/11
%ag&1;}else i!num@&bo$l"
s[i].runs3#else i!num&&bo$l"{cout
8/18/2019 Computer Program-ODD EVEN
8/11
{i!s[i].runs>ma"{
ma&s[i].runs;pos&i;}}cout
8/18/2019 Computer Program-ODD EVEN
9/11
Output
8/18/2019 Computer Program-ODD EVEN
10/11
8/18/2019 Computer Program-ODD EVEN
11/11