You are on page 1of 1

#include <stdio.

h>
int main()
{
char texto[100];
gets(texto);
do {
printf( "%s\n",texto );
gets(texto);
} while ( strcmp(texto, "salir") != 0 );
fprintf( stderr, "El usuario ha tecleado 'salir'" );
}
______________________________________________________________
#include <stdio.h>
int main()
{
char texto[100];
freopen( "resultado.txt","wb",stdout );
gets(texto);
do {
printf( "%s\n",texto );
gets(texto);
} while ( strcmp(texto, "salir") != 0 );
fprintf( stderr, "El usuario ha tecleado 'salir'" );
}
______________________________________________________________

You might also like