Code:
#include <stdio.h>
int main() {
char buffer[666] = {0};
while (buffer[0] != 'n') {
printf("do you want to repeat (y/n) ");
fgets(buffer, 666, stdin);
}
return 0;
}
Originally Posted by
grumpy
Of course. Spoonfeeding is always more desirable than requiring you to solve a problem.
There's nothing wrong with asking for example code. One of the worst trends in documentation is the sort which prattles incoherently on for pages without managing to demonstrate anything concrete.
Unless someone has to make little choo-choo train noises to get the OP to open his/her mouth. Then it's spoonfeeding.
Originally Posted by
i6472
Well, i have a problem. i'm interested that is it possible to repeat a program with command goto or some other order i C ?
Kind of amazing you know this word "goto" but seem completely unaware of "loops". You had a VIC20 or something back in the day didn't you?