ll alfa 8:10 PM 96% D A docs.google.com 11736151 * Question 1 Write a program that asks the user to enter the number of passengers in an airplane and the weight of baggage for these passengers. Your...


ll alfa<br>8:10 PM<br>96% D<br>A docs.google.com<br>11736151<br>*<br>Question 1<br>Write a program that asks the user to enter the number of passengers in an airplane and the<br>weight of baggage for these passengers. Your program should then print the average weight<br>of all baggage; it should also print the weights in reverse order.<br>Sample run:<br>Enter the number of passengers in the airplane: 8<br>Enter the weights of 8 baggage: 16 45 60 13 24 29 50 30<br>The average weight of all baggage is 33.375<br>The entered weights in reverse order are 30 50 29 24 13 60 45 16<br>Your answer<br>Question 2<br>Write a method int countMultiplesofFive ( int x, int y) that returns the number of multiples<br>of 5 bounded between x and y inclusive.<br>In the main, generate two random numbers between 7 and 92 inclusive. Use the method<br>countMultiplesofFive to find and print how many multiple of 5 exists between the two<br>randomly generated numbers inclusive.<br>Sample run 1:<br>First random: 11<br>Second random: 80<br>There are 14 number that are multiple of five between 11 and 80<br>

Extracted text: ll alfa 8:10 PM 96% D A docs.google.com 11736151 * Question 1 Write a program that asks the user to enter the number of passengers in an airplane and the weight of baggage for these passengers. Your program should then print the average weight of all baggage; it should also print the weights in reverse order. Sample run: Enter the number of passengers in the airplane: 8 Enter the weights of 8 baggage: 16 45 60 13 24 29 50 30 The average weight of all baggage is 33.375 The entered weights in reverse order are 30 50 29 24 13 60 45 16 Your answer Question 2 Write a method int countMultiplesofFive ( int x, int y) that returns the number of multiples of 5 bounded between x and y inclusive. In the main, generate two random numbers between 7 and 92 inclusive. Use the method countMultiplesofFive to find and print how many multiple of 5 exists between the two randomly generated numbers inclusive. Sample run 1: First random: 11 Second random: 80 There are 14 number that are multiple of five between 11 and 80

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here