Answered step by step
Verified Expert Solution
Question
1 Approved Answer
solve using dev c++ Lab task 2: Programming. - Create a C++ program that will solve the given programming problems below. Problem 1 - File
solve using dev c++
Lab task 2: Programming. - Create a C++ program that will solve the given programming problems below. Problem 1 - File Name: Money.cpp Description: Ali loves to play Massive Multiplayer Online Role-playing Game (MMORPG), and he is very excited! The game uses a coin-based money system that can be acquired through playing in combat mode. After spending a long time playing in the combat mode to earn money, Ali meet a very generous user, EpicJohnny42. He made an offer to Ali: if you give me all your money, I will give you double the amount. What Ali doesn't know is that EpicJohnny42 is a devious scammer. When they trade, Epic Johnny42 will give Ali double the amount, except he will "forget to put the last digit. For example: If Ali gave 9874 gold he should receive 19,748, but since EpicJohnny42 is a scammer he will give him 1,974 gold removing the last digit (8) instead of 19,748. Unfortunately, while you were reading this problem Ali had already accepted the trade, failing to notice the error. Now your task is to determine how much money does Ali lost during the trade. Hint: To remove the last digit of an integer number. The number should be divided by 10. Example: 19748 / 10 the result is 1974. Input Format: Your program should accept an integer value m where (10Step 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