Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void main(void){
- char buffer[20000];
- printf("ingrese texto:");
- fflush( stdin );
- scanf("%s",buffer);
- char opcion[10];
- printf("\nDesea guardar el archivo? presione G:");
- scanf("%s",opcion);
- FILE *org;
- if(strcmp(opcion,"g")==0){
- org = fopen("benjamin.txt","at");
- fprintf(org,"%s",buffer);
- fclose(org);
- printf("texto guardado\n");
- }
- else{
- printf("saliendo del programa sin guardar...\n");
- }
- }
Add Comment
Please, Sign In to add comment