#include <stdio.h>
#include <conio.h>
int main()
{
again:
FILE *fp;
fp=fopen("g.txt", "a+");
char a;
a=getche();
while(a!='.')
{
fputc(a, fp);
a=getche();
}
fprintf(fp, "\n");
printf("\nPrograme is ended, would you like to input again? y/n: ");
a=getch();
if(a == 'y' || a == 'Y')
{
printf("\n");
goto again;
}
}
#include <conio.h>
int main()
{
again:
FILE *fp;
fp=fopen("g.txt", "a+");
char a;
a=getche();
while(a!='.')
{
fputc(a, fp);
a=getche();
}
fprintf(fp, "\n");
printf("\nPrograme is ended, would you like to input again? y/n: ");
a=getch();
if(a == 'y' || a == 'Y')
{
printf("\n");
goto again;
}
}