My loop aint workin properly? its supposed to let me keep enter a menu number untill it sees a 0??Code:#include <stdio.h>
#include <string.h>
int main(int argc, char ** argv)
{
// Mainline Variable Declarations
FILE * output = stdout;
FILE * input = stdin;
float exposureTime; // Exposure time
char aperture[4]; // Array of size 4
int menu=0;
do
{
// Prompt user for exposure time (number)
fprintf(output,"Please enter menu number: ");
// Input of exposure time
fscanf(input,"%s",menu);
if(menu == 1)
{
fprintf(output,"you have entered the help menu\n");
}
else if (menu==2)
{
fprintf(output,"you have entered the real menu\n");
}
}
while (menu != 0);
return(0);
}