#include <stdio.h>
#include <stdlib.h>

double calcula_media (N1, N2, N3)
double N1, N2, N3;
{
   return ( ( N1 + N2 + N3 ) / 3.0 );
}

main ( )
{     double Nota1, Nota2, Nota3;  double Media;

      scanf ("%lf",&Nota1); 
	  scanf ("%lf",&Nota2); 
	  scanf ("%lf",&Nota3);
      Media = calcula_media (Nota1, Nota2, Nota3); 
      printf (" Media = %lf \n", Media);
 
      scanf ("%lf",&Nota1); 
	  scanf ("%lf",&Nota2); 
	  scanf ("%lf",&Nota3);
      Media = calcula_media (Nota1, Nota2, Nota3); 
      printf (" Media = %lf \n", Media);
	  
	  printf("\n\n");
	  system("pause");
}
