

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A lab exercise for creating a console application in vc++ using microsoft visual studio 2003. The program should display a welcome screen, rules, and allow the user to play a 'game of chance' where they press 'r' to generate random numbers and calculate scores, sums, and products. After 10 chances, the user is informed if they won or lost and given the option to replay. Bonus marks are given for optimal code, error checking, and proper indentation and commenting.
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!
Problem Statement: In this assignment you have to write a Console application in VC++ using Microsoft Visual Studio 2003. Your program should do the following things. In this assignment you have to write a program for a game called “Game of chance”. Upon execution your program should show a welcome screen to the user as follows.
After user presses enter following screen should be displayed showing the rules of the game.
After that user presses any key the game should start. Every time the user presses three random numbers should be generated and displayed on the screen with the scores. Also the sum and product of the numbers should be displayed. When the user presses ‘r’ again the previous screen should get cleared and new random number along with their score, sum and product should be displayed. A sample is in the following figure.
After completion of all the 10 chances the screen should be cleared and user should be displayed the appropriate message either he won or lost the game, with the option to replay the game.
You may add some additional functionality in this game this part carry 2 points.
Instructions:
Submission Guidelines: