Ask your own question, for FREE!
Computer Science 10 Online
OpenStudy (anonymous):

how do I stop this loop on java while (payroll <0 && payroll <=10);{ System.out.print("enter Nambe of employee:\n"); name = input.next(); System.out.print("Enter hourly rate:\n"); HrRate = input.nextInt(); System.out.print("Enter hours for day0:\n"); day0 = input.nextInt(); System.out.print("Enter hourly day

OpenStudy (anonymous):

I want to stop the loop by the given number of payroll, if its two is gona stop at 2 if the user gives 10 it gonna stop at 10 and so on.

OpenStudy (rsmith6559):

This is better suited to a for loop: for( int i = 0; i < payroll; i++ )

OpenStudy (bibby):

That's horrible loop logic not to mention the layout. What are you even trying to do?

OpenStudy (anonymous):

I'm trying to do a loop where i gave the instruccion of how many Employees im going to see their salary. the statement is gonna ask me name of the employee plus the hour rate and the hours of 5 days he/she worked. At the en of the statement is gonna show me the total salary made by the 5 days and total hours worked. the loop is gonna repeat it if I choose to repeatit in (payroll) howmany time i want, might be 2. so is gonna repeat and display the same statement before and so on. after the loop finished i need to show how many hours and total salalary made both or more employees.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!