1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#include <stdio.h>
#include <stdlib.h>
typedef struct personne {
char nom[15];
char prenom[15];
int age;
struct description {
int poids;
int taille;
};
};
int main()
{
int i;
struct personne.description{
("toto","Jean",24,60,175);
("tata","Jacques",36,80,190);
("titi", "Paul",28,70,180);
("tutu", "Nick",32,75,185);
};
while(i<=4)
{
printf(" %c %c %d %d %d", personne[i].nom, personne[i].prenom, personne[i].age, personne[i].description.poids, personne[i].description.taille);
}
system("pause");
} |
Partager