Computer Science, asked by panthers22, 1 year ago

.3 Code Practice Question 3
Write a program that accepts a time as an hour and minute. Add 15 minutes to the time, and output the result.

Answers

Answered by salonidarji2004
1

here is your Java program

import java.util.*;

public class Time

{

public static void main()

{

Scanner sc = new Scanner(System.in);

System.out.println("Enter hours");

int hr = sc.nextInt();

System.out.println("Enter minutes");

int min = sc.nextInt();

int a = hr*60;

int b = a+min;

int c = b+15;

System.out.println("Time is :" + c + " min");

}

}

follow me

hope it helps

mark it as brainliest

Similar questions