Help me i have code the problem with two inputs from keyboard (Tim and $15,000) code runs but not passing the test. Code is here:

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String name = br.readLine();
String m = br.readLine();
System.out.println(name+" earns "+m+" per month. Haw-haw!");

asked 23 May '15, 05:19

Asif%20Ali's gravatar image

Asif Ali
11
accept rate: 0%

edited 27 May '15, 07:04

Kim%20Lee-Ling's gravatar image

Kim Lee-Ling ♦♦
564


Maybe

System.out.println(name+" earns $"+m+" per month. Haw-haw!");

link

answered 27 May '15, 12:36

Piterskuy's gravatar image

Piterskuy
1
accept rate: 0%

BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
String name=input.readLine();
System.out.println(name+" earns $15,000 per month. Haw-haw!");
link

answered 28 May '15, 10:06

heltin's gravatar image

heltin
111
accept rate: 0%

BufferedReader read = new BufferedReader(new InputStreamReader(System.in));

    String name = read.readLine();

    System.out.println(name+ " earns $15,000 per month. Haw-haw!");
link

answered 14 Nov '17, 07:25

Vchornyy's gravatar image

Vchornyy
1
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×67
×51
×11
×1

Asked: 23 May '15, 05:19

Seen: 1,950 times

Last updated: 14 Nov '17, 07:25