Using Java to, write a program that asks the user for survey data about bus riders, and outputs a summary of that data. Your program should first ask the user which bus line was surveyed. Then the program asks the user how many days the survey was conducted, storing an integer answer, and then enter the number of riders that were counted (also an int). Take the number of riders devided by number of days. [If that average is not a whole number, make sure you show the decimal value (such as in the examples below). You should use a type cast to make this work. Please use "printf" to display the result with 2 digits after the decimal point (rounded to the nearest hundredth) and commas separating thousands.]
Using Java to, write a program that asks the user for survey data about bus riders, and outputs a summary of that data.
Your program should first ask the user which bus line was surveyed.
Then the program asks the user how many days the survey was conducted, storing an integer answer, and then enter the number of riders that were counted (also an int).
Take the number of riders devided by number of days.
[If that average is not a whole number, make sure you show the decimal value (such as in the examples below). You should use a type cast to make this work. Please use "printf" to display the result with 2 digits after the decimal point (rounded to the nearest hundredth) and commas separating thousands.]
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images