Write a Java program to display three monthly sales of different vehicle types. The rows and columns represent the monthly sales of each vehicle type.
JAN FEB MAR SUV 25 15 35 COUPE 25 55 35 SEDAN 11 20 45 VAN 17 27 25
Using a Two-Dimensional array, produce the vehicle type sales report and the total sales made for each vehicle type. If the total sales made per month are greater than or equal to 100, gold status is awarded. If the monthly sales are less than 100, silver status is awarded.
public class Main {
public static void main(String[] args) {
p(" \t\t SUV\t COUPE\t SEDAN\t\tVAN");
p("JAN\t\t 25\t 25\t 11\t\t 17");
p("FEB\t\t 15\t 55\t 20\t\t 27");
p("MAR\t\t 35\t 35\t 45\t\t 25");
}
private static void p(String s) {
System.out.println(s);
}
}
Comments
Leave a comment