Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  TotalSales.java
Language: JAVA
Code:

public class TotalSales
{
public static void main (string[] args )
{
Int [][]Sales = { {12,24,18,23},{10,8,12,19},{28,40,22,16},{4,28,49,3},{14,17,25,9} };
System.out.println(“       emp1    emp2    emp3   emp4    ptoduct  totals“        );
 Int productCounter = 1;
for(int row = 0;row <Sales.length;row++)
{
System.out.println(“product ”+productCounter+”---->”);
for(int column = 0;column <Sales[row].length; column ++)
{
System.out.println(“%d\t”,Sales[row][column]);
}
productCounter++;
System.out.println();
}
System.out.println(“/////////////////////////////////////////////////////////////////////////”);
System.out.println(“emp.total----->”);
}
}
Comments: