Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (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 .

OpenStudy (anonymous):

what i have is name=stdin.next(); System.out.println("Gabe"); age=stdin.nextInt(); System.out.println("20"); System.out.println("The age of + name + " is " + age");

OpenStudy (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

OpenStudy (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.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!