• anonymous
Write some code that reads in a name  and an age and then prints the message  "The age of NAME  is AGE" on a line by itself, where NAME  and AGE are replaced by the values  read in for the variables  name  and age. For example, if your code read in "Rohit" and 70 then it would print out "The age of Rohit is 70" on a line by itself. There should NOT be a period in the output .
Computer Science
  • Stacey Warren - Expert
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
  • chestercat
I got my questions answered at in under 10 minutes. Go to now for free help!
  • anonymous
what i have is; System.out.println("Gabe"); age=stdin.nextInt(); System.out.println("20"); System.out.println("The age of + name + " is " + age");
  • anonymous
This hw section says The output should be in the form, "the age of Gabe is 20" the quotes should be there, but when i compile it _ it says you should be using the + operator
  • blurbendy
So you want the quotes to be included in the output? If so you need to do something like: "\"hello\"" which would print "hello" WITH the quotations.

Looking for something else?

Not the answer you are looking for? Search for more explanations.