Write a program that reads one positive integer and finds the sum and average of ODD digits. If the number doesn't have odd digits, the program prints an appropriate message. Assume that your input is valid. Don't run your program for numbers larger than 2147483647.
Example 1: 26448
Output: no odd digits
Example 2: 67132
Output: sum of odd digits is 11, average of odd digits is 3.6666667
One airline company charges 10% extra for tickets in the first 5 rows and gives 5% discount for tickets in the last 5 rows. Write a program that first reads the number of family members going on the airplane, the base price for one ticket and the number of rows on the airpline. Then the program reads the row number for each ticket. The program finds the total cost of the tickets and the average ticket price. You can assume that input is valid.
Write a program that first reads 1 integer. If the integer is 1 , the program reads a series of non-negative integers between 10 and 99. The first negative value will terminate the input. The program finds sum and average of the numbers with BOTH EVEN digits. USE LOOP WHILE in this part. If the first input integer is 2, the program reads 10 additional integers and finds the amount of inputs that are divisible by 4. USE LOOP FOR in this part. If the first input integer is not 1 or 2, the program prints error message.
Write a program that reads 10 integers and finds amount of ints divisible by 3, their sum, product and average. Use loop FOR
write a program that reads one integer and finds the number, sum and average of all divisors that are divisible by 3 of the input number example: input 24 all divisors: 1, 2, 3, 4, 6, 8, 12, 24 divisors that are divisble by 3: 3, 6, 12, 24 their sum = 45 average= 45/4.0 = 11.25
All stores in some store chain assign 6-digit positive integer number for each product, we will call this number item ID. Last 3 digits of the item ID is a category ID.
Important: If you only wrote first function, write the following main: the program reads total number of items in the store and 3-digit ID category and finds the number of items in that category.