-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCallLogs.java
More file actions
26 lines (24 loc) · 943 Bytes
/
CallLogs.java
File metadata and controls
26 lines (24 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.io.*;
import java.lang.String;
public class CallLogs {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// Scanner sc = new Scanner(System.in);
System.out.print("Enter Num: " );
int n = Integer.parseInt(br.readLine());
System.out.println("Enter Names and thier time: " );
String[] names = new String[n];
float[] time = new float[n];
for (int i = 0; i < n; i++) {
names[i] = br.readLine();
time[i] = Float.parseFloat(br.readLine());
}
System.out.println("Enter Your Start and End in hours: " );
int s = Integer.parseInt(br.readLine());
int e = Integer.parseInt(br.readLine());
for (int i = 0; i < n; i++) {
if (time[i] >= s && time[i] <= e)
System.out.println(names[i]);
}
}
}