How to calculate a mathematics without input it in cmd(run java application) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to calculate a mathematics without input it in cmd(run java application)

31st Oct 2018, 5:08 AM
Adrian Vengeance
5 Answers
+ 3
Please be specific with your question so people can understand you
31st Oct 2018, 7:00 AM
chris
chris - avatar
0
Can you explain better?
31st Oct 2018, 5:52 AM
KrOW
KrOW - avatar
0
import java.util.Scanner; public class KelilingPersegiPanjang { static int Panjang; static int Lebar; static double Keliling; static Scanner s; public static void main (String args[]) { System.out.println("Mencari Keliling Persegi Panjang"); s = new Scanner(System.in); System.out.print("Masukan Panjang : "); Panjang = s.nextInt(); System.out.print("Masukan Lebar : "); Lebar = s.nextInt(); Keliling= 2 * (Panjang + Lebar); System.out.println("Keliling Persegi Panjang = " + Keliling); } } When Run Java Application, we should Input data through Cmd, how to make it wo don't have to input the data in Cmd but we input it when typing it
31st Oct 2018, 8:21 AM
Adrian Vengeance
0
i9
25th Apr 2019, 6:41 AM
M. isco
M. isco - avatar
0
ju799wp0v i0
25th Apr 2019, 6:41 AM
M. isco
M. isco - avatar