| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

ElevatorFitter

Page history last edited by PBworks 16 years, 5 months ago

Write a java program called ElevatorFitter that determines the number of people who can fit in an elevator if the weight of a person is 150 lbs and the elevator has a weight limit of 1400 lbs.

 

Use the following piece of code to calculate the nubmer of people who can fit

numberOfPeople=elevatorWeightLimit/weightOfaPerson

 

Remember-You must declare each variable and assign it a type!

Your print out should read:

You can fit ___ people on the elevator.

 

Hint:

System.out.println causes a return after a the string of words

System.out.print does not cause a return after the string of words.

Comments (0)

You don't have permission to comment on this page.