- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCallLogs.java
More file actions
Latest commit
26 lines (24 loc) · 943 Bytes
/
Copy pathCallLogs.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
importjava.io.*;
importjava.lang.String;
publicclassCallLogs {
publicstaticvoidmain(String[] args) throwsIOException {
BufferedReaderbr = newBufferedReader(newInputStreamReader(System.in));
// Scanner sc = new Scanner(System.in);
System.out.print("Enter Num: " );
intn = Integer.parseInt(br.readLine());
System.out.println("Enter Names and thier time: " );
String[] names = newString[n];
float[] time = newfloat[n];
for (inti = 0; i < n; i++) {
names[i] = br.readLine();
time[i] = Float.parseFloat(br.readLine());
}
System.out.println("Enter Your Start and End in hours: " );
ints = Integer.parseInt(br.readLine());
inte = Integer.parseInt(br.readLine());
for (inti = 0; i < n; i++) {
if (time[i] >= s && time[i] <= e)
System.out.println(names[i]);
}
}
}