The code snippet is
#include <stdio.h>
int main() {
  char another = 'y';
  if (another == 'y') {
    printf("Add Another? (y/n)\n");
    scanf("%c", &another);
    main();
  } else if (another == 'n') {
    return 1;
  } else {
    main();
  }
}
This is a part of somewhat larger program, In that also it is prompted twice for each iteration. Please tell me where the problem is? Thanks in advance.
 
     
    