how can i make the data exported to a file import java.util.Scanner; public class BMI { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String first_name; int kg;...


how can i make the data exported to a file


import java.util.Scanner;
public class BMI {




public static void main(String[] args) {


Scanner scanner = new Scanner(System.in);


String first_name;
int kg;
double height;
double bmi;




for(int i=1; i<4; i++)="">


System.out.print("NAME ");
first_name=scanner.next();


System.out.print("WEIGHT, kg");
kg=scanner.nextInt();


System.out.print("HEIGHT, m");
height=scanner.nextDouble();




bmi= kg / (height * height);




System.out.printf("%s %20s %20s %20s", "NAME", "Weight", "Height", "BMI");
System.out.println();
System.out.printf("%-10s %12d %21.2f %22.2f",first_name,kg,height,bmi);
System.out.println();
}


}
}



Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here