
Silvana Rolón
Preguntastudent•
hace 5 años
#include <stdio.h> #include <string.h> #include <stdlib.h> int main(int argc, char const *argv[]) { struct persona { char nombre[100]; int edad; }; struct persona persona1 = {0}; strcpy(persona1.nombre, "Silvana"); persona1.edad = 21; if(strlen(persona1.nombre) < 3 || persona1.edad < 18) { printf("Indique nombre y edad, por favor"); return 1; } printf("Nombre: %s\nEdad: %d\n", persona1.nombre, persona1.edad); return 0; }