Question 14 Write a program that finds the families whose incomes are above the average among other families using the f
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Question 14 Write a program that finds the families whose incomes are above the average among other families using the f
Question 14 Write a program that finds the families whose incomes are above the average among other families using the following steps: . Read an integer k from the keyboard and then create an array of double values of size k. . Read & values representing family income from the keyboard and place them into the array. Find the maximum income among these values. . Find the average for these values. Display the array index of the families whose incomes are more than the average. Sample Run: . . How many families are there? 7 Enter the income for each of the families Income for family 0: 9000 Income for family 1: 11000 Income for family 2: 21000 Income for family 3: 25000 Income for family 4: 13000 Income for family 5: 15000 Income for family 6: 18000 The maximum income is: 25000.00 AED The average income is: 16000.00 AED Families whose incomes are more than the average: Family 2 Family 3 Family 6 For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). - > Y A > %