Some problem solving programming challenges, i have solved. Not all are here, but started adding them slowly.
This project is maintained by chankruze
You are playing a game at your local arcade, and you receive 1 ticket from the machine for every 12 points that you score. You want to purchase a squirt gun with your tickets. Given your score, and the price of the squirt gun (in tickets) are you able to buy it?
Evaluate whether or not you have scored high enough to earn enough tickets to purchase the squirt gun at the arcade.
The first input is an integer value that represents the points that you scored playing, and the second input is an integer value that represents the cost of the squirt gun (in tickets).
A string that say ‘Buy it!’ if you will have enough tickets, or a string that says ‘Try again’ if you will not.
500
40
Buy it!
By scoring 500 points, you will receive 41 tickets, which is enough to buy the squirt gun at a price of 40 tickets.
Language | Solution |
---|---|
C | not available |
CPP | not available |
C# | not available |
Python | available |
Java | not available |
Ruby | not available |
Swift | not available |