/*
Copyright 2011 Guillermo García Santana
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see
*/
#include
#include
using namespace std;
float calcula (int he,int hs, int me, int ms,float precio_h);
int main()
{
int dias=0,dato=0;
float precio_h=0.0;
float final=0.0;
vector ndia;
vector vhe;
vector vhs;
vector vme;
vector vms;
cout<<" **************************************** "<>precio_h;
cout <<" Numero de dias a calcular: ";cin>>dias;
cout<<" -------------------"<> dato;
ndia.push_back(dato);
cout << "\n Entrada.. "<> dato;
vhe.push_back(dato);
dato=0;
cout << " Introduce los minutos: "; cin >> dato;
vme.push_back(dato);
dato=0;
cout << " Salida.. "<> dato;
vhs.push_back(dato);
dato=0;
cout << " Introduce los minutos: "; cin >> dato;
vms.push_back(dato);
dato=0;
}
for (int i=0;i23){
he=0;
}
++he;
horas++;
if (he == hs) salir=true;
} while(salir==false);
min=me+ms;
if ( min>=60 )
{
min=min-60;
++horas;
}
precio_m=precio_h/60;
precio_m=precio_m*min;
precio_h=precio_h*horas;
cout<<", total: "<