+ 1
I'm writing a program to help calculate a formula at work. Is there an easy way to write this code also is it possible in java
https://sololearn.com/compiler-playground/c7TGpxj0t1Pr/?ref=app
4 Réponses
+ 2
import java.util.Scanner;
public class Calculate {
static Scanner sc = new Scanner( System.in)
.useDelimiter( "\n");
public static void main(String[] args) {
int LM, UPS, UPE;
System.out.print( "LM = ");
LM = sc.nextInt();
System.out.print( "UPS = ");
UPS = sc.nextInt();
System.out.print( "UPE = ");
UPE = sc.nextInt();
double
M = LM * 0.0895 * 0.0215,
UPT = UPS - UPE,
UPP = UPT / M;
System.out.printf( """
m3 Total: %f
Total Ltr: %f
Uptake: %f
""", M, UPT, UPP);
}
}
+ 2
Please do not paste the code here. Instead, give us the link to your code like this:
https://sololearn.com/compiler-playground/cZ5o1gkY5WBh/?ref=app
That way, people can fully see and run your code directly.
+ 2
Yeah, you could write the code in Java.
0
Sorry didn't know. Updated it