need some help
Given a string variable s that has already been declared, write some code that repeatedly reads a value from standard input into s until at last a "Y" or "y"or "N" or "n" has been entered.
i tried a bunch of things but i just cant get it to work if anyone could help i would appreciate it.thanks
Welcome to the forum :D
Well what most people do is to post their attempt (usually a non-working one) and then everybody is trying to help :)
Also learn that it is critical for the time and the chances you have to get a quick and exact (and of course correct) answer is heavily depended on how you ask the question.You say "..from stdin into s until.."
Well,now i have to guess.You might want to say to append to the end of string.But why should i guess?Wouldn't it be nice to give a simple example just to make sure that even people like me would totally understand? :) In this way you avoid the case of bad guessing which leads to un-needed post and wasted time :)
I don't think I have enough information. If I enter "Thursday" does it stop? The way you've posed the problem is deliberately confusing.