Question: Write a program that reads 2-D array from the user which contains the following data: The first column is the customer ID. The second column

Write a program that reads 2-D array from the user which contains the following data: The first column is the customer ID. The second column is the customer gender (1 for males / 2 for females). The third column is the customer age. The fourth column is the money paid The program must first make sure that the 2-D array is positive. Then it asks the user to enter the required gender, age and money paid that the shop will give the offer. After that it must display the customers info that meets that requirements otherwise display 'Not Found'. Finally ask him if he wants to continue or no. The shop will give the offer (pay 80 % of money paid) if The same gender as required. The age less than or equal the required age. The customer paid more than or equal the required money paid Input/output Sample: Enter customers info: [100 1 20 1000; 101 2-40 750; 102 1 35 400; 103 -2 18 225; 104 1 46 1550; 105 1 50 900; 106 2 31 1200] Error!! Re-Enter customers info: [100 1 20 1000; 101 2 40 750; 102 1 35 400; 103 2 18 225; 104 1 46 1550; 105 1 50 900; 106 2 31 1200] Enter required gender: 1 Enter required age: 40 Enter required paid: 700 ID Gender Age Paid 100 1 20 800 Do you want to continue? (y): y Enter required gender: 2 Enter required age: 45 Enter required paid: 500 ID Gender Age Paid 101 2 40 600 106 2 31 960 Do you want to continue? (y): y Enter required gender: 1 Enter required age: 30 Enter required paid: 1500 Not found Do you want to continue?:n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
