sid's

OPen Discussion
 
HomePortalCalendarFAQSearchRegisterMemberlistLog in

Share | 
 

 problem occur~

View previous topic View next topic Go down 
AuthorMessage
sujun06



Posts : 1
Join date : 2008-02-22

PostSubject: problem occur~   Thu Mar 20, 2008 1:21 am

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~
Back to top Go down
View user profile
 
problem occur~
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» possible 4l60e problem?
» I need some help with a Nerf problem..
» power transformer problem - help?
» Don Juan Rehearsal...What's really the problem here?
» Please help me diagnose a running condition problem.

Permissions in this forum:You cannot reply to topics in this forum
sid's :: TEACHING MATERIAL :: UPM-SAK3100-
Jump to: