#include
#include
#include
#include
void main()
{
FILE *fptr;
char name[10],c;
clrscr();
fptr=fopen("myfile.txt","a");
do
{
printf("Name:");
scanf("%s",name);
fprintf(fptr,name);
fprintf(fptr,",");
printf("Press \"y\" to continue\n");
c=getche();
}while(toupper(c)=='\Y');
fclose(fptr);
}
No comments:
Post a Comment