#include <iostream>
using namespace std;
int calculateSec (int, int, int);
int calculateTime (int, int);
int main()
{
int totalseconds1 = 0;
int totalseconds2 = 0;
int hr1 = min1 = sec1 = 0;
int hr2 = min2 = sec2 = 0;
double dif;
int amt;
cout<<"Enter the first time: hr, min, sec:"<<endl;
cin>>hr1>>min1>>sec1>>endl;
cout<<"Enter the second time: hr, min, sec:"<<endl;
cin>>hr2>>min2>>sec2>>endl;
totalseconds1= calculateSec (int hour, int min1, int sec1)
totalseconds2= calculateSec (int hr2, int min2, int sec2)
time=calculateTime (int totalseconds1, int totalseconds2)
diff=time/3600;
if(diff<=1)
amt=10;
else if(diff<=4)
amt=15;
else if (diff<=10)
amt=20;
else
amt=30;
cout<<"Amount=:"<<amt;
return 0;
}
{
void calculateSec (hour,min,sec)
hour = hr1 * 3600
min = min1 * 60
totalseconds1=hour+min
}
{
void calculateTime( totalseconds1, totalseconds2)
time=totalseconds2-totalseconds1;
}