SlideShare a Scribd company logo
Dr. A.Q.Khan Institute of Computer Science and Information Technology
Kahuta Distt. Rawalpindi
(End Semester Exam Spring 2016)
Subject: Programming Fundamentals
Registration No: _____________
Student Name:____________________
Class /Semester: BSCS-1
Credit Hours:__4_____
Duration:_180 mins___
Total Marks: 50______
___________________________________________________________________________
Q no. 01: (12.5)
Write C++ code that compares the value of ‘X’ element entered by the user in order to count the occurrence of
‘X’ element in the list of integer numbers. Your code should output the element X, number of times element X
has appeared, it should also display message if that ‘X’ element doesn’t exist in the array. All the abnormal
conditions must be handled by the code. (make separate functions)
Q no. 2: (12.5)
Write simple C++ code for letting the user play the following game:
The game will be played with two dice. Each time the pair of dice is tossed, the sum of two number that
comes up is used. That sum will be an integer in the range 2 to 12 since the faces of each die are number 1 to 6.
The player wins immediately if he tosses a 7 or 11, and user loses immediately if he tosses a 2,3 or 12. If user
tosses a 4,5,6,8,9 or 10 then that number becomes his ‘point’. The user then repeats tossing the dice until he
wins by making his point or he losses by tossing a 7.
Q no. 3: (12.5)
Write and run a program that plays the game of “Rock, paper, scissors.” Your game must possess the following
:-In this game, two players simultaneously say (or display a hand symbol representing) either “rock,” “paper,”
or “scissors.” The winner is the one whose choice dominates the other. The rules are: paper dominates (wraps)
rock, rock dominates (breaks) scissors, and scissors dominate (cut) paper. (Hint: Use functions).
Q no. 4: (12.5)
Write and run a program like that computes and prints both the mean and the standard deviation of the input
data. The standard deviation of the n numbers ao, . . ., an-1, is defined by the formula
where is the mean of the data.
Extend the program that it also computes and prints the Z-scores of the input data. The Z-scores of the n
numbers ao, . . ., anml are defined by the formula zi = (ai - )/ . They normalize the given data so ,that
it is centered about 0 and has standard deviation 1
All the Best 

More Related Content

What's hot

04 struct-union
04 struct-union04 struct-union
04 struct-union
CHINTHAPADMAJA
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and Answers
Abdul Rahman Sherzad
 
Os sample mid exam
Os sample mid examOs sample mid exam
Os sample mid exam
Mesfin123
 
Math 107 final examination answers
Math 107 final examination answersMath 107 final examination answers
Math 107 final examination answers
arnitaetsitty
 
D-Square statistic
D-Square statisticD-Square statistic
D-Square statistic
Muhammad Zulqarnain
 
016 lesson 7
016 lesson 7016 lesson 7
016 lesson 7
edwin caniete
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
Syahriha Ruslan
 

What's hot (7)

04 struct-union
04 struct-union04 struct-union
04 struct-union
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and Answers
 
Os sample mid exam
Os sample mid examOs sample mid exam
Os sample mid exam
 
Math 107 final examination answers
Math 107 final examination answersMath 107 final examination answers
Math 107 final examination answers
 
D-Square statistic
D-Square statisticD-Square statistic
D-Square statistic
 
016 lesson 7
016 lesson 7016 lesson 7
016 lesson 7
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
 

Similar to End term

C++ programming exercise
C++ programming exerciseC++ programming exercise
C++ programming exercise
khapul
 
1 Faculty of Computer Studies Information Technology a.docx
1 Faculty of Computer Studies Information Technology a.docx1 Faculty of Computer Studies Information Technology a.docx
1 Faculty of Computer Studies Information Technology a.docx
mercysuttle
 
1 ECE 175 Computer Programming for Engineering Applica.docx
1  ECE 175 Computer Programming for Engineering Applica.docx1  ECE 175 Computer Programming for Engineering Applica.docx
1 ECE 175 Computer Programming for Engineering Applica.docx
oswald1horne84988
 
CSP1150D Programming Principles
CSP1150D Programming PrinciplesCSP1150D Programming Principles
CSP1150D Programming Principles
Nicole Valerio
 
Industrial Control System Assignment Help|25% Online Assignment Help
Industrial Control System Assignment Help|25% Online Assignment HelpIndustrial Control System Assignment Help|25% Online Assignment Help
Industrial Control System Assignment Help|25% Online Assignment Help
Nicole Valerio
 
Hw8Excel - Exercise 8 Mail Merge-2.docINFS 3250In Class Pro.docx
Hw8Excel - Exercise 8 Mail Merge-2.docINFS 3250In Class Pro.docxHw8Excel - Exercise 8 Mail Merge-2.docINFS 3250In Class Pro.docx
Hw8Excel - Exercise 8 Mail Merge-2.docINFS 3250In Class Pro.docx
adampcarr67227
 
ELAVARASAN.pdf
ELAVARASAN.pdfELAVARASAN.pdf
ELAVARASAN.pdf
dharmendra kumar jaiswal
 
C - Programming Assignment 1 and 2
C - Programming Assignment 1 and 2C - Programming Assignment 1 and 2
C - Programming Assignment 1 and 2
Animesh Chaturvedi
 
Java Practice Set
Java Practice SetJava Practice Set
Java Practice Set
Gaurav Dixit
 
Oop lab assignment 01
Oop lab assignment 01Oop lab assignment 01
Oop lab assignment 01
Drjilesh
 
Java programming lab assignments
Java programming lab assignments Java programming lab assignments
Java programming lab assignments
rajni kaushal
 
Statement of Operations and Financial StatementsSubmit written r.docx
Statement of Operations and Financial StatementsSubmit written r.docxStatement of Operations and Financial StatementsSubmit written r.docx
Statement of Operations and Financial StatementsSubmit written r.docx
whitneyleman54422
 
Ge6161 lab manual
Ge6161 lab manualGe6161 lab manual
Ge6161 lab manual
Mani Kandan
 
ISM3230 In-class lab 8 Spring 2019 TOPIC Introduction .docx
ISM3230 In-class lab 8 Spring 2019 TOPIC  Introduction .docxISM3230 In-class lab 8 Spring 2019 TOPIC  Introduction .docx
ISM3230 In-class lab 8 Spring 2019 TOPIC Introduction .docx
vrickens
 
Lab sheet 1
Lab sheet 1Lab sheet 1
Lab sheet 1
alish sha
 
R Language
R LanguageR Language
R Language
ShwetDadhaniya1
 
Gradient boosting for regression problems with example basics of regression...
Gradient boosting for regression problems with example   basics of regression...Gradient boosting for regression problems with example   basics of regression...
Gradient boosting for regression problems with example basics of regression...
prateek kumar
 
Lab exam question_paper
Lab exam question_paperLab exam question_paper
Lab exam question_paper
Kuntal Bhowmick
 
R Programming Intro
R Programming IntroR Programming Intro
R Programming Intro
062MayankSinghal
 
Assignment Java Programming 2
Assignment Java Programming 2Assignment Java Programming 2
Assignment Java Programming 2
Kaela Johnson
 

Similar to End term (20)

C++ programming exercise
C++ programming exerciseC++ programming exercise
C++ programming exercise
 
1 Faculty of Computer Studies Information Technology a.docx
1 Faculty of Computer Studies Information Technology a.docx1 Faculty of Computer Studies Information Technology a.docx
1 Faculty of Computer Studies Information Technology a.docx
 
1 ECE 175 Computer Programming for Engineering Applica.docx
1  ECE 175 Computer Programming for Engineering Applica.docx1  ECE 175 Computer Programming for Engineering Applica.docx
1 ECE 175 Computer Programming for Engineering Applica.docx
 
CSP1150D Programming Principles
CSP1150D Programming PrinciplesCSP1150D Programming Principles
CSP1150D Programming Principles
 
Industrial Control System Assignment Help|25% Online Assignment Help
Industrial Control System Assignment Help|25% Online Assignment HelpIndustrial Control System Assignment Help|25% Online Assignment Help
Industrial Control System Assignment Help|25% Online Assignment Help
 
Hw8Excel - Exercise 8 Mail Merge-2.docINFS 3250In Class Pro.docx
Hw8Excel - Exercise 8 Mail Merge-2.docINFS 3250In Class Pro.docxHw8Excel - Exercise 8 Mail Merge-2.docINFS 3250In Class Pro.docx
Hw8Excel - Exercise 8 Mail Merge-2.docINFS 3250In Class Pro.docx
 
ELAVARASAN.pdf
ELAVARASAN.pdfELAVARASAN.pdf
ELAVARASAN.pdf
 
C - Programming Assignment 1 and 2
C - Programming Assignment 1 and 2C - Programming Assignment 1 and 2
C - Programming Assignment 1 and 2
 
Java Practice Set
Java Practice SetJava Practice Set
Java Practice Set
 
Oop lab assignment 01
Oop lab assignment 01Oop lab assignment 01
Oop lab assignment 01
 
Java programming lab assignments
Java programming lab assignments Java programming lab assignments
Java programming lab assignments
 
Statement of Operations and Financial StatementsSubmit written r.docx
Statement of Operations and Financial StatementsSubmit written r.docxStatement of Operations and Financial StatementsSubmit written r.docx
Statement of Operations and Financial StatementsSubmit written r.docx
 
Ge6161 lab manual
Ge6161 lab manualGe6161 lab manual
Ge6161 lab manual
 
ISM3230 In-class lab 8 Spring 2019 TOPIC Introduction .docx
ISM3230 In-class lab 8 Spring 2019 TOPIC  Introduction .docxISM3230 In-class lab 8 Spring 2019 TOPIC  Introduction .docx
ISM3230 In-class lab 8 Spring 2019 TOPIC Introduction .docx
 
Lab sheet 1
Lab sheet 1Lab sheet 1
Lab sheet 1
 
R Language
R LanguageR Language
R Language
 
Gradient boosting for regression problems with example basics of regression...
Gradient boosting for regression problems with example   basics of regression...Gradient boosting for regression problems with example   basics of regression...
Gradient boosting for regression problems with example basics of regression...
 
Lab exam question_paper
Lab exam question_paperLab exam question_paper
Lab exam question_paper
 
R Programming Intro
R Programming IntroR Programming Intro
R Programming Intro
 
Assignment Java Programming 2
Assignment Java Programming 2Assignment Java Programming 2
Assignment Java Programming 2
 

More from ZUbaria Inayat

Chapter3 part3-cmm-for-cis6516
Chapter3 part3-cmm-for-cis6516Chapter3 part3-cmm-for-cis6516
Chapter3 part3-cmm-for-cis6516
ZUbaria Inayat
 
Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...
Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...
Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...
ZUbaria Inayat
 
Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...
Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...
Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...
ZUbaria Inayat
 
QA in RE
QA in REQA in RE
QA in RE
ZUbaria Inayat
 
SINP requirements
SINP requirementsSINP requirements
SINP requirements
ZUbaria Inayat
 
Lecture01 0089
Lecture01 0089Lecture01 0089
Lecture01 0089
ZUbaria Inayat
 
Sample1
Sample1Sample1
Salesforce tutorial lec 09
Salesforce tutorial lec 09Salesforce tutorial lec 09
Salesforce tutorial lec 09
ZUbaria Inayat
 
Tutorial usecases
Tutorial usecasesTutorial usecases
Tutorial usecases
ZUbaria Inayat
 
End term bsce fall18 26122018
End term bsce fall18 26122018End term bsce fall18 26122018
End term bsce fall18 26122018
ZUbaria Inayat
 
A4 montgomery-woodall-six-sigma
A4 montgomery-woodall-six-sigmaA4 montgomery-woodall-six-sigma
A4 montgomery-woodall-six-sigma
ZUbaria Inayat
 

More from ZUbaria Inayat (11)

Chapter3 part3-cmm-for-cis6516
Chapter3 part3-cmm-for-cis6516Chapter3 part3-cmm-for-cis6516
Chapter3 part3-cmm-for-cis6516
 
Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...
Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...
Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...
 
Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...
Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...
Explainable artificial-intelligence-xai-for-exploring-spatial-variability-of-...
 
QA in RE
QA in REQA in RE
QA in RE
 
SINP requirements
SINP requirementsSINP requirements
SINP requirements
 
Lecture01 0089
Lecture01 0089Lecture01 0089
Lecture01 0089
 
Sample1
Sample1Sample1
Sample1
 
Salesforce tutorial lec 09
Salesforce tutorial lec 09Salesforce tutorial lec 09
Salesforce tutorial lec 09
 
Tutorial usecases
Tutorial usecasesTutorial usecases
Tutorial usecases
 
End term bsce fall18 26122018
End term bsce fall18 26122018End term bsce fall18 26122018
End term bsce fall18 26122018
 
A4 montgomery-woodall-six-sigma
A4 montgomery-woodall-six-sigmaA4 montgomery-woodall-six-sigma
A4 montgomery-woodall-six-sigma
 

Recently uploaded

CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
PuktoonEngr
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
PauloRodrigues104553
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 

Recently uploaded (20)

CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt2. Operations Strategy in a Global Environment.ppt
2. Operations Strategy in a Global Environment.ppt
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 

End term

  • 1. Dr. A.Q.Khan Institute of Computer Science and Information Technology Kahuta Distt. Rawalpindi (End Semester Exam Spring 2016) Subject: Programming Fundamentals Registration No: _____________ Student Name:____________________ Class /Semester: BSCS-1 Credit Hours:__4_____ Duration:_180 mins___ Total Marks: 50______ ___________________________________________________________________________ Q no. 01: (12.5) Write C++ code that compares the value of ‘X’ element entered by the user in order to count the occurrence of ‘X’ element in the list of integer numbers. Your code should output the element X, number of times element X has appeared, it should also display message if that ‘X’ element doesn’t exist in the array. All the abnormal conditions must be handled by the code. (make separate functions) Q no. 2: (12.5) Write simple C++ code for letting the user play the following game: The game will be played with two dice. Each time the pair of dice is tossed, the sum of two number that comes up is used. That sum will be an integer in the range 2 to 12 since the faces of each die are number 1 to 6. The player wins immediately if he tosses a 7 or 11, and user loses immediately if he tosses a 2,3 or 12. If user tosses a 4,5,6,8,9 or 10 then that number becomes his ‘point’. The user then repeats tossing the dice until he wins by making his point or he losses by tossing a 7. Q no. 3: (12.5) Write and run a program that plays the game of “Rock, paper, scissors.” Your game must possess the following :-In this game, two players simultaneously say (or display a hand symbol representing) either “rock,” “paper,” or “scissors.” The winner is the one whose choice dominates the other. The rules are: paper dominates (wraps) rock, rock dominates (breaks) scissors, and scissors dominate (cut) paper. (Hint: Use functions). Q no. 4: (12.5) Write and run a program like that computes and prints both the mean and the standard deviation of the input data. The standard deviation of the n numbers ao, . . ., an-1, is defined by the formula where is the mean of the data. Extend the program that it also computes and prints the Z-scores of the input data. The Z-scores of the n numbers ao, . . ., anml are defined by the formula zi = (ai - )/ . They normalize the given data so ,that it is centered about 0 and has standard deviation 1 All the Best 