looping back in C

March 9, 2011 at 00:59:16
Specs: Windows 7
hi guys so i'm trying to do this. Having an option menu in C and try to loop it back after the help option.

#include <stdio.h>

char &response;

int main (int argc, char *argv[])
printf ("option a\n");
printf ("option b\n");
printf ("H Help\n");
scanf ("%c", &response);

if (answer =='a')
printf ("Option a\n");

else if (answer =='b')
printf ("option b\n");

else if (answer =='h')
printf ("help\n");

return 0;

but i dunno how to loop it back.

See More: looping back in C

Report •

March 9, 2011 at 01:32:50
Use a while loop.

Report •
Related Solutions

Ask Question