There are total 7,000 students in a university having three different disciplines. Their discipline code and yearly tuition fee per student are as follows: Discipline of Student Code Yearly tuition fee (in Rupees) Medica

CS Professional · Information Technology and Systems Audit · PYQS · December 2018
There are total 7,000 students in a university having three different disciplines. Their discipline code and yearly tuition fee per student are as follows: Discipline of Student Code Yearly tuition fee (in Rupees) Medical M ₹ 90,000 Engineering E ₹ 70,000 Arts A ₹ 30,000 Draw a flowchart to read the name, discipline code of the student from the file and print the total yearly revenue earned by the university and the number of students discipline-wise.

Answer & Explanation:

SYMBOLS USED NS = Name of the Student NOS = Number of Student DC = Discipline Code NM = Number of Medical Students NE = Number of Engineering Students NA = Number of Arts Students TR = Total Revenue (Initial Value is 0) NOS = Total Number of Students Flowchart Description: START Initialize variables: Nos = 0 , NM = 0 , NE = 0 , NA = 0 . READ NS, DC (Read Student Name and Discipline Code) Decision: IS DC = M? If Yes: NM = NM + 1 If No: Go to next decision. Decision: IS DC = E? If Yes: NE = NE + 1 If No: NA = NA + 1 (Implies it's Arts if not Medical or Engineering) Increment total number of students: NOs = NOs + 1 Decision: IS NOS < 7000? If Yes: Go back to READ NS, DC to process next student. If No (all 7000 students processed): Calculate Total Revenue. Calculate Total Revenue: TR = (NM * 90,000) + (NE * 70,000) + (NA * 30,000) PRINT TR, NM, NE, NA (Print Total Revenue, Number of Medical, Engineering, and Arts Students) STOP

Topics: Programming Concepts

Open in Interactive Practice Hub · Full Practice Hub · Chapter Weightage · More in this subject

Related Questions in this Topic