Question: In lecture we looked at a go - again loop which defaulted to no ; that is , unless y or Y ,

In lecture we looked at a go-again loop which defaulted to "no"; that is, unless y or Y, the loop exits:
char resp ='y' ;
while( resp=='y'|| resp=='Y')
{
// processing...
printf( "InEnter another input? (y/[n])=>");
// the space preceding the %c tells scanf to skip whitespace
}
scanf("%c", &resp );
Modify this code so that the default is to go again, only exiting when n or N is entered.
Q3 Put this code segment in your labsheet.
 In lecture we looked at a go-again loop which defaulted to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!