import java.util.Scanner;
public class demooop {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Sila masukkann tinggi dan lebar segitiga: ");
int tinggi= input.nextInt();
int lebar= input.nextInt();
double luas = 0.5 *(tinggi*lebar);
double ukurlilit = Math.sqrt((tinggi*tinggi) +(lebar*lebar));
System.out.println("tinggi: "+tinggi);
System.out.println("lebar: "+lebar);
System.out.println("luas: "+luas);
System.out.println("ukurlilit: "+ukurlilit);
}
}
identify suitable object, data and method.
No comments:
Post a Comment