-
pls someone help me
[FONT=Arial][COLOR=Black]
please try this program in java...
the problem is:
write a program that plays word game with the user. the program would ask the user to input the following:
1.what is your name?
2.what is your age?
3.where do lived?
4.what is your school name?
5. what is your proffesion?
6. what type of animal?
7. what is your pets name?
after the user have enter this items, the program should display the following story, inserting the user's inputs into the approriate location:
"There once was a person <name> who lived in <location>. At the age of <age>,<name>, went to <school>. <Name> graduated and went to work as a <proffession>. Then <Name> adopted a <animal> name <petsName>. They both lived hapilly ever after".
try to write this in java: its fun (^_^)..... thank you!
-
 Originally Posted by javacc
[FONT=Arial][COLOR=Black]
please try this program in java...
the problem is:
write a program that plays word game with the user. the program would ask the user to input the following:
1.what is your name?
2.what is your age?
3.where do lived?
4.what is your school name?
5. what is your proffesion?
6. what type of animal?
7. what is your pets name?
after the user have enter this items, the program should display the following story, inserting the user's inputs into the approriate location:
"There once was a person <name> who lived in <location>. At the age of <age>,<name>, went to <school>. <Name> graduated and went to work as a <proffession>. Then <Name> adopted a <animal> name <petsName>. They both lived hapilly ever after".
try to write this in java: its fun (^_^)..... thank you!
funny u
-
Have you tried the problem yourself yet? You even read the 1st chapter in your book yet?
Get user input 7 times and assign it to 7 variables. Then output a string (the story) substituting in the variables like so:
String name = user input
String location = user input
String story = "There once was a person "+name+" who lived in "+location+". At the";
-
There is a java tutorial online gives a similar program example. Go have a look here http://scad.co.nr
-
Funny how people keep posting their homework here...
-
 Originally Posted by ractoc
Funny how people keep posting their homework here...
Well... somehow some homework did not have the example in the book the recommend by the lecturer... but this question.... i think all book mention about it...
Similar Threads
-
By simplyvenky10 in forum C++
Replies: 9
Last Post: 07-27-2006, 10:08 AM
-
By sachinkataria in forum Java
Replies: 0
Last Post: 07-18-2006, 08:51 AM
-
By sachinkataria in forum Java
Replies: 3
Last Post: 07-15-2006, 02:19 AM
-
By venki.P in forum Database
Replies: 0
Last Post: 01-10-2002, 01:43 AM
-
Replies: 0
Last Post: 11-29-2001, 09:07 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|