Take a positive integer from the user. Keep displaying anerror message and prompting for input again
and again if the user enters invalid input (negative or zero)
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted May 8, 2012, 11:32 PM
for(;;)
{
}
or
while(true)
{
}
or
do
{
}
while()
when you meet your criteria to get the positive integer then you can exit from the loop.
VulpesPosted May 8, 2012, 4:37 PM