Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Mobile wallet is a virtual wallet that stores payment card information on a mobile device. Write a C++ program that asks the user to enter
Mobile wallet is a virtual wallet that stores payment card information on a mobile device. Write a C++ program that asks the user to enter three numbers: wallet balance, mobile no. to pay money to (assume mobile no. is exactly 8 digits), and the amount of money to pay and performs the following: 1. Calculate the discount amount on the amount of money to pay according to the following table: VIRGILIRUDISH If mobile no. starts with 44 discount-5% from money to pay Ti mobile no. starts with 88 discount= 7% from money to pay Other numbers discount=0% 2. Calculate: price = money to pay discount 3. Display the error message "Transaction Failed" if the price is larger than the wallet balance, otherwise display the price and new wallet balance (subtract from wallet balance the price). Sample input/output Sample 2 pa ou put Enter balance, mobile no. and money to pay: Enter balance, mobile no, and money to pay: 200 44111133 100 80 44555500 100 Transaction Failed New balance: 105 Price: 95
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started