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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| #include<stdio.h>
#include<conio.h>
#include<string.h>
int n;
void remplir(struct bibl* ,int );
void afficher(struct bibl* ,int );
/*void rechercher(
void afficherauteur(*/
struct bibl
{char titre[50];
char auteur[50];
int prix;
};
struct bibl* t[50];
main()
{
printf("entrer le nombre de livres:");
scanf("%d",&n);
void remplir(bibl* t,int n);
void afficher(bibl* t,int n);
/*rechercher(struct bibl,n)
afficherauteur(struct bibl,n)*/
getch();
}
void remlpir(struct bibl* t[50],int n)
{int i;
for(i=0;i<n;i++)
{
printf("entrer le titre du livre");
scanf("%s",&t[i].titre);
printf("enter le nom de l'auteur du livre");
scanf("%s",&t[i].auteur);
printf("entrer le prix du livre");
scanf("%d",&t[i].prix);
}
}
void afficher(struct bibl* t[50],int n)
{ int i;
for(i=0;i<n;i++)
{
printf("t[i].titre");
}
} |
Partager