harlo demo~ i hav question abt group assignment 2 question 2.
public class EmployeesNeeded{
public static void main(String [] args){
int[] customers = new int [336];
for(int k=1;k<15;k++){
for(int i =0; i<=customers.length; i++){
for(int j=1;j<25;j++){
System.out.println("Please enter numbers of customers each hours for 14 days: ");
customers[i]=MyInput.readInt();
}}}
System.out.println("Days\t\tHours\t\tCustomers per Hours\t\tEmployees Needed");
System.out.println("--------------------------------------------------------");
for(int k=1;k<15;k++){
for(int i =0; i<=customers.length; i++){
for(int j=1;j<25;j++){
System.out.println(k+"\t\t"+j+"\t\t"+customers[i]+"\t\t"+employeesper20(customers));
}}}
}
public static int employeesper20(int[] array){
int finalneed=0;
for(int i=0; i<=array.length;i++){
int need=array[i]/20;
if(need<=3)
finalneed=3;
else
finalneed=need;
}
return finalneed;
}
}
then when i run it, it jst nonstop to obtain data.
can u plz help me to figure out whats wrong with it?
thx a lot~