0
Ask anyone there? If yes then reply hello else if any other reply, ask anyone there? again
Anyone can code this I want to know how it's done I am trying to do it with do while function but it's not working It's printing hello even when the input is not yes I want the program to reply hello when the user types yes
5 Réponses
+ 3
I think your condition has to be negative:
while(!w.equalsIgnoreCase("yes"))
Because you want the loop to run over and over as long as the user *not* inputs 'yes'.
+ 5
Please show us your code!
You can upload it in 'Code Playground' and link it here.
+ 1
hello thank you for responding and i posted my code it doesnt run in this website but runs in eclispe. also i am a newbie so feed me knowledge all you can! :p
+ 1
Man you are right thanks for the help