//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include <iostream.h>
#include <conio.h>
//---------------------------------------------------------------------------
#pragma argsused
int main()
{
int dt,hdia[7],th[10],tho=0,promh[10],y=3;
float sal[10];
string nomb[10],mej;
for(int i=0;i<10;i++)
{
clrscr();
cout<<"Iserte el nombre # "<<i+1<<": ";
cin>>nomb[i];
tho=0;
for(int k=0;k<7;k++)
{
cout<<"Inseerte las horas trabajadas el "<<k+1<<" dia: ";
cin>>hdia[k];
tho=tho+hdia[k];
th[i]=tho;
}
sal[i]=th[i]*1.25;
promh[i]=(th[i])/3.00;
clrscr();
}
textcolor( LIGHTRED );
for (int k=0;k<49;k++)
{
gotoxy(k,1);cprintf("-");
gotoxy(k,23);cprintf("-");
}
for(int z=0;z<23;z++)
{
gotoxy(1,z);cprintf("|");
gotoxy(11,z);cprintf("|");
gotoxy(26,z);cprintf("|");
gotoxy(38,z);cprintf("|");
gotoxy(48,z);cprintf("|");
}
gotoxy(3,2);cprintf("Nombre:");
gotoxy(18,2);cprintf("Total H:");
gotoxy(30,2);cprintf("Salario:");
gotoxy(40,2);cprintf("Prom. H.");
for(int a=0;a<10;a++)
{
y++;
gotoxy(3,y+a);cout<<nomb[a]<<endl;
gotoxy(18,y+a);cout<<th[a]<<endl;
gotoxy(30,y+a);cout<<sal[a]<<endl;
gotoxy(40,y+a);cout<<promh[a]<<endl;
for (int h=0;h<49;h++)
{
gotoxy(h,y+a-1);cprintf("-");
}
}
getch();
return 0;
}
//---------------------------------------------------------------------------