• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using While loop for printing the user entered name from console  RSS feed

 
Venkat Renga
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the question
Ask user to enter a name alphabet by alphabet, and print d whole word as output,,,,,, use while loop?

Since i am new to JAVA..i have no clue on how to begin?


Expecting some guidance

 
Knute Snortum
Sheriff
Posts: 4276
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post some code of what you've done. It doesn't have to be complete. How do you get input from a user? Make an empty while loop to srart with.
 
Arthur Vinicius Rebelo
Ranch Hand
Posts: 30
1
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Venkat. Perhaps you might want to ask ( before getting alphabet-by-alphabet) the number of alphabets the name will have? You can control your input loop better.
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please explain. Do you want one letter per iteration? How are you going to signal completion? Are you going to use ctrl‑Z or ctrl‑D?
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what do you know how to do? Have you installed the jdk (or whatever they call it these days?) Can you write a "Hello world" program, compile it, and run it?

Do you need help getting the input, writing a while loop, printing stuff to the screen?

Things work best around here if you ask specific, focused questions, rather than broad "help me"
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!