#include<iostream>
#include<string>
using namespace std;
class Project
{
char ch, name[30], add[30], subj[15];
int age;
float msal,gross, lfee[11], annual, total[11];
public:
void enter();
void disp();
};
void Project::enter()
{
do
{
cout<<"\nEnter name: ";
gets(name);
cout<<"\nEnter address: ";
gets(add);
cout<<"\nEnter subject taken: ";
gets(name);
cout<<"\nEnter monthly salary: ";
cin>>msal;
gross = msal*12;
cout<<"\n\t\tEnter late fee";
{
for(int i=0; i<12; i++)
{
cout<<"\nIn month "<<(i+1)<<":\t";
cin>>lfee[i];
total[i] = total[i] + lfee[i];
annual = msal-total[i];
}
};
cout<<"Do you want to continue?\t (Y/N)\n";
cout"\n\n";
cin>>ch;
}
while(ch=='Y'&&ch=='y');
};
void Project::disp()
{
cout<<"total salary: "<<annual;
};
int main()
{
Project obj;
obj.enter();
obj.disp();
return 0;
}