Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how did i get this code to look exactly like the example output for isrance how did i get the muni line i inpit to

how did i get this code to look exactly like the example output for isrance how did i get the muni line i inpit to show up in the final line of text and how do i take out the commas in my numbers
image text in transcribed
image text in transcribed
class Main f public static void main(String[] args) f Scanner sc=new Scanner(System. in): System. out.println("Welcome to the Muni Ridership Calcutator."); System.out,println("Which Muni line did you survey?"); String muniline=sc. nextLine(); System. out, print ln("How many days did you survey ridership? "); int daysusc. nextInt (); System. out. print ("How many riders did you count? "); int riderusc. nextInt (): float avg =(1loat ) rider/days: System. out.printf("According to your survey, an average of $,.2t people rode the Muni line per day.", avg, aunitithe): 1st example: Welcome to the Muni Ridership Calculator. Which Muni line did you survey? K-Ingleside How many days did you survey ridership? 5 How many riders did you count? 123456 According to your survey, an average of 24691.20 people rode the K-Ingleside per day. 2nd example: Welcome to the Muni Ridership Calculator. Which Muni line did you survey? N-Judah How many days did you survey ridership? 30 How many riders did you count? 25000 According to your survey, an average of 833.33 people rode the N-Judah per day

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions

Question

=+1. What brands do you use?

Answered: 1 week ago