#include <iostream.h>
#include <fstream.h>
#include <math.h>
void main ()
{
cout<<"**********************welcom*******************";
float n,j,q,d,h,t,i,m,f,b,v;
cout<<"\n num of eng = ";
cin >> j;
n=j ;
q=0;
d=0;
h=0;
t=0;
v =0 ;
for (i=1;i<=n;i++)
{ v = i;
cout<<"\n\n ** Engineer ID "<<v;
cout<< "\n\n insert Salary = ";
cin>> m;
d=m /(22) ;
h=d/(8) ;
cout<<"\n Leave : ";
cin>>f;
cout<< "\n Attend : ";
cin >> b;
t= f - b ;
q= t * h ;
cout<<"\n this day salary = "<<q;
ofstream examplefile ("example.txt");
if (examplefile.is_open())
{
examplefile <<" engineer ID.\n"<<v;
examplefile<<"\n\n"<<q;
examplefile.close();
}
}
}
blue: -4 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.