In this program you will find a total price of the purchase based on the following rule: items priced a 100 dollars and below receive 15% discount. All other items receive 25% discount. Write a program that first reads one integer - the number of items user purchased in the store. The program then reads the price for each item. The program finds the total purchase price based on the rule above.
For example, item with barcode 123 belongs to non-perishable category, and item with barcode 131313 belongs to perishable category.
Write the function num_digit that has one parameter, positive integer. The function returns the number of digits in the parameter. For example, for parameter 123, the function returns 3, for parameter 131313, the function returns 6. USE LOOP WHILE IN THE FUNCTION
Write the program (main) that reads the number of items in the store. The program reads the barcode for each item and counts the number of items in each category. YOU MUST USE LOOP FOR IN MAIN
Bonus: Rewrite program 1: write a function that finds the total purchase price for 1 person. In main, read the number of people, find total price for each person and average price per person