Subtracting New TIme interval

I wanted to subtract two time interval. here one time interval is 5hour 30 minute and other is current time.the code is written as follow.
Error report i am getting while run on arduino platform . but this code working fine run on python.

error: invalid operands of types 'double' and 'int' to binary 'operator%'

main()
{
int Time1;
int Time2;
int hour=10;
int minute=5;
int second=13;
int h; int m;
double  Ntime;
Time1=(3600*5)+(60*30);
Time2=(3600*hour)+(60*minute)+second;
Ntime=Time2-Time1;
Ntime=((Ntime%60)/100+(Ntime/60));
h=(int)(Ntime);
m=((Ntime-h)*100);
printf("hour after subtraction is : %d hour %d min",h,m) 

}

AMPS-N:
I wanted to subtract two time interval. here one time interval is 5hour 30 minute and other is current time.the code is written as follow.
Error report i am getting while run on arduino platform . but this code working fine run on python.

error: invalid operands of types 'double' and 'int' to binary 'operator%'

I have a Rexx program that does the same thing, and it works, so why doesn't it work on an Arduino?

Perhaps I'll go look in the reference section.

Ntime=((float)((int)Ntime%60)/100+(Ntime/60));

for this it will compile but result is not as expected

SInce Hour 6 and minute is 5 subtracted from 5h.30m
expected answer is 0:15

int hour1=6;
int minute1=5;

if(hour1>=0 &&hour1<5)
{
  h=hour1-5;
  if(h<0)
  {
   h=h-24; 
  }
  //h=sign(h);
}else
{
   h=hour1-5;
}

Serial.print("hour:");
Serial.println(h);

if(minute1>0 && minute1<30)
{
  m=minute1-30;
  if(m<0)
  {
    m=m+60;
  }
   // m=sign(m);
}else
{
  m=minute1-30;

}

Perhaps there's something in the Reference section.

i know there is library called time.h where we can set or add time difference

AMPS-N:
I wanted to subtract two time interval. here one time interval is 5hour 30 minute and other is current time.the code is written as follow.
Error report i am getting while run on arduino platform . but this code working fine run on python.

error: invalid operands of types 'double' and 'int' to binary 'operator%'

main()

{
int Time1;
int Time2;
int hour=10;
int minute=5;
int second=13;
int h; int m;
double  Ntime;
Time1=(36005)+(6030);
Time2=(3600hour)+(60minute)+second;
Ntime=Time2-Time1;
Ntime=((Ntime%60)/100+(Ntime/60));
h=(int)(Ntime);
m=((Ntime-h)*100);
printf("hour after subtraction is : %d hour %d min",h,m)

}

Modulo (%) only works on integers (int or long) not floating point values. So
Ntime%60is invalid because Ntime is a double (why ?)

The code does not compile because of a missing semi-colon nor does it produce any output because it uses printf(). Is this really an Arduino question ?

lar3ry:
Perhaps there's something in the Reference section.

There is, of course, but it seems sometimes even the most obvious hints are never taken. { sigh }

@AMPS-N - your non-Arduino question could have been answered by a very simple Google search, or an even simpler RTFM.

Why int Time? Use long and check.

I have time t1=13:05
t2=5:30
t1 minute=1360+05=785
t2 in minute=5
60+30=330
t1-t2=455minute
time diff=455/60=7 hour 58 minute
but expected is 7 hour 35 minute

question here how to calibrate above. Yes i have written in C ,then i converting to Arduino IDE just replacing printf to Serial.printf.

Do you understand decimal (base 10) arithmetic?
Do you understand how it differs from sexagesimal (base 60) arithmetic?
0.58 of an hour is not 58 minutes.

converting to Arduino IDE just replacing printf to Serial.printf.

Good luck with that.