Computer Science, asked by syedhassankhan1, 8 months ago

write a program that asks the user to enter an hour value and minute value.the main ()function should then pass these two values to a type void function that displays. the two values in the format shown in the following sample run: enter the number of hours: 9 enter the number of minutes: 28 time 9:28

Answers

Answered by kanika00976
1

HM...............................

PLEASE MARK ME AS BRAINLIEST

Answered by viraj766
0
Import java.util.*;

Class Time{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
System.out.println(“Enter number of hours”);

int hr = sc.nextInt();
System.out.println(“Enter number of minutes”);
int min = sc.nextInt();

display(hr,min);
}
void display(int hr,int min){
System.out.println(hr+”:”+min);
}
}
Similar questions