Question: Financial Aid During Pandemic NOTES : MAKE IN C LANGUAGE Prime Minister has announced that the government will give financial aid to reduce the burden
Financial Aid During Pandemic



NOTES : MAKE IN C LANGUAGE
Prime Minister has announced that the government will give financial aid to reduce the burden of the people during the pandemic. Upon this initiation, recipient will receive money with the following amounts: RM1000 for household category B40 RM600 for household category M40 In this problem, N data are given which contains the category, name, and the amount of money received. You are asked to display all data in a category, B40 or M40. Output the information of the recipients in that category, how many recipients are in that category, and the total amount of money for all of the recipients in that category. Input Format Input will be given in a file named "testdata.in. The first line consists of an integer N. The next N lines consist of the given data. Each data consists of category, name, and the amount f money received, respectively, separated by commas. The next line contains the category you want to display, B40 or M40. Output Format First, for all recipients under the asked category, output the category, name, and the amount of money received. Print in the order from the input. In the next line, output Total Recipients:, followed by the number of recipients under the asked category. In the next line, output "Total Amount:", followed by the total amount of money for all recipients under the category. Constraints 13N
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
