im trying to find the average coffee drank by the programmers. I can find and display the average but it just seems wrong, the way it is displayed. I just can't manage to extract the last line which displays the average.

```
char poste[]={'A','P','A','P','A','O','P','P','O'};
int nbCafe[]={3,5,2,1,7,1,0,3,2};
int progonly=0;
float progmoyenne=0;

for(i=0;i<9;i++){
   if (poste[i]=='P'){
       progonly+=nbCafe[i];
       progmoyenne=progonly/4.0;}
printf("%f\n",progmoyenne);}

```

The execution gives this.(the last line is the average coffee drank):

```
0.000000
0.000000
0.000000
0.000000
0.000000
0.250000
0.250000
1.000000
2.250000

```