I want to know how to set the length for the input and also how to get the size of the string that is entered by the user.
For example, they might enter 9 or 99 to represent the number of tickets they want to buy, but I do not want to limit them to enter 2 digits every time like 09 for singular, I want that they can enter 9$ or 99$. After that based on the length of the input, the number will be treated as different values, if the input is only 1 digit then the first digit will be represented as one, if the input is a 2 digit input then the first digit will represent tens.
After that I will multiply using the formulae of:
Total = 1.5 * number of stops traveled * number of ticket * 105%
How do I perform the calculation?