Question: i need it in java programming public class Baseball { public static void main(String [] args) { int dodgers; int yankees; int orioles; Scanner scnr

i need it in java programming

public class Baseball { public static void main(String [] args) { int dodgers; int yankees; int orioles;

Scanner scnr = new Scanner(System.in); yankees = scnr.nextInt(); dodgers = scnr.nextInt(); orioles = scnr.nextInt();

System.out.print("the Yankees scored " + yankees + '', and''); System.out.print("Last night the Dodgers scored " + dodgers + '',''''); System.out.print("the Cubs scored " + cubs + ''.''); }

Ex: the If input is:

2 3 4 

the output is:

Last night the Dodgers scored 2, the Yankees scored 3, and the Cubs scored 4. 

End the last output with a newline.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!