-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvm.java
More file actions
24 lines (22 loc) · 750 Bytes
/
Copy pathvm.java
File metadata and controls
24 lines (22 loc) · 750 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
import java.util.Scanner;
public class vm {
public static void timeCal(int initialTime, int finalTime, int d){
int aux, time;
time = finalTime - initialTime;
aux = d / time;
result = aux;
}
static int result;
public static void main(String[] args){
int initialTime, finalTime, d;
Scanner read = new Scanner(System.in);
System.out.println("Enter the initial time:");
initialTime = read.nextInt();
System.out.println("Enter the final time:");
finalTime = read.nextInt();
System.out.println("Enter the distance:");
d = read.nextInt();
timeCal(initialTime, finalTime, d);
System.out.println("The Vm is: " + result);
}
}