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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
| #include<stdio.h>
#include<stdlib.h>
#define TAILLE 30
#define BUFFER_SIZE 100
typedef struct
{
char nom[BUFFER_SIZE];
float salaire;
}
MaStructure;
MaStructure tab[TAILLE];
void personneSalaire(MaStructure tab[TAILLE]);
void salaireSupSmic (MaStructure tab[TAILLE]);
void moyenneSalaire (MaStructure tab[TAILLE]);
int main ()
{
void personneSalaire(MaStructure tab[TAILLE]);
void salaireSupSmic (MaStructure tab[TAILLE]);
void moyenneSalaire (MaStructure tab[TAILLE]);
system("pause") ;
return 0 ;
}
void personneSalaire(MaStructure tab[TAILLE])
{}
void salaireSupSmic (MaStructure tab[TAILLE])
{
int i;
float salaire;
float moyenne;
char noms;
int n;
for(i=0;i<TAILLE;i++)
{
if(salaire >12541,31)
{
scanf("%s",&noms);
printf("les personnes dont le salaire est superieur au smic sont :%s\n",noms);
}}}
void moyenneSalaire (MaStructure tab[TAILLE])
{
int i;
float salaire;
float moyenne;
float somme;
somme=0 ;
for(i=0;i<TAILLE;i++)
{
somme=somme+salaire;
}
moyenne=somme/TAILLE;
scanf("%2f",&moyenne);
printf("le salaire moyen est de :%2f\n",moyenne);
} |