Use the get_seconds function to work out the amount of seconds in 2 hours and 30 minutes, then add this number to the amount of seconds in 45 minutes and 15 seconds. Then print the result.
@python
Answers
Answered by
0
public class Main
{ static int s;
public static int get_seconds(int a,int b,int c)
{ int seconds;
seconds=(3600*a)+(60*b)+c;
return seconds;
}
public static int add_seconds(int d,int e,int f)
{ int secondss;
secondss=(3600*d)+(60*e)+f;
return secondss;
}
public static void main(String[] args) {
s=get_seconds(2,30,0)+add_seconds(0,45,15);
System.out.println(s+" Seconds");
}
}
Similar questions