Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[20} [10 marks} Write a C++ program [not a function] that prompts the user to enter an number from 1 to 4 to claim a

image text in transcribed
[20} [10 marks} Write a C++ program [not a function] that prompts the user to enter an number from 1 to 4 to claim a prize or a penalty. Display the following message depending on the number: 1. You win $113! 2. You lose $10! 3. You winl'lose nothing! 4. You win $5! For any other number, display the message: You entered an inoorreot number! You lose $1M! Use the using directive for oout. but only for cin. You must use an else if structure

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions