Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/04/2010, 03:13
satic77
 
Fecha de Ingreso: octubre-2009
Mensajes: 25
Antigüedad: 14 años, 6 meses
Puntos: 0
Printf con x caracteres

hola
a ver si alguien me echa un cable
para que cuando recogo caracteres con gets

me haga el prinf cuando haya escrito 10 caracteres y si se puede omitir el enter mejor,

hasta haora tengo esto.
Código C:
Ver original
  1. #include "stdio.h"
  2.  
  3. main()
  4. {
  5. char lee[50];
  6. int r;
  7. gets(lee);
  8. /* leer listo */
  9.  
  10. /* omitir enter */
  11.  
  12.  
  13. /* inprimir lee cuando leas 10 caracteres*/
  14. printf("Has Introducido %s\n", lee);

un saludo