#include <stdio.h> // Para gets() y puts()
#include <conio.h> // Para clrscr() y gotoxy()
#include <string.h> // Para strlen()
void main()
{
char nombre[31];
clrscr();
gotoxy(10,1);
puts("¿ Cuál es tu nombre ? ");
gotoxy(35,1);
gets(nombre);
clrscr();
gotoxy (10,1);
puts("ELEMENTO CARACTER DIRECCION");
for( int x=0 ; (x <strlen(nombre)+5) && (x<23); x++)
{
gotoxy(10,x+2);
printf("nombre[%2d] %c= %4d %9u",
x,nombre[x],nombre[x],&nombre[x]);
}
}
| Página siguiente |