#include<iostream>
using namespace std;
const double FEE_PAYABLE = 90000;
struct Student
{
char adm_no[20],name[25];
int no_of_units;
double fee_paid, fee_balance;
};
int main()
{
Student *stud; //Dynamic Array
int i, total_number;
cout<<"How many students do you want to work with? ";
cin>>total_number;
stud = new Student[total_number];
for(i = 0;i < total_number;i++)
{
cout<<"\n\nData entry for the student "<<(i + 1)<<":\n"
<<"------------------------------------------------------------\
n";
cout<<"Enter the admission number of the student: ";
cin>>stud[i].adm_no;
cout<<"Enter his/her name: ";
cin>>stud[i].name;
cout<<"Enter the number of units he/she is doing: ";
cin>>stud[i].no_of_units;
cout<<"Enter fee he/she has paid: ";
cin>>stud[i].fee_paid;
stud[i].fee_balance = FEE_PAYABLE - stud[i].fee_paid;
}
for(i = 0;i < total_number;i++)
{
cout<<"\n\nAnalysis for the student:"
<<"\n---------------------------------------";
cout<<"\nAdmission Number: "<<stud[i].adm_no
<<"\nName: "<<stud[i].name
<<"\nNumber of Units: "<<stud[i].no_of_units
<<"\nFee Paid: "<<stud[i].fee_paid
<<"\nFee Balance: "<<stud[i].fee_balance;
}
cout<<"\n\n";
return 0;
}