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 32 33 34 35 36
   | #include<stdio.h>
struct personne {
	char nom[20];
	char num[20];
}personne[20];
void siasie(struct personne *perso,int nombre)
{
	int i;
	for(i=0;i<nombre;i++)
	{
		printf("entrez le nom = ");
	    scanf("%s",&perso->nom);
        printf("entrez le num = ");
	    scanf("%s",&perso->num);
	}
 
}
 
void affiche (struct personne perso[20],int nombre)
{
	int i;
	for(i=0;i<nombre;i++)
	{
		printf("%d de numero %d", perso->nom,perso->num);
	}
}
 
void main(void)
{
	struct personne perso[20];
	int nombre;
	printf("entrez le nombre");
	scanf("%d",&nombre);
	siasie(perso,nombre);
	affiche(perso,nombre);
} | 
Partager