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

int main()
{
	float x=1, a=1, b, c, d, e, f, a1, a2;
	
	
	printf("\nInforme Altura %0.f:", a);
	scanf("%f",&b);
	c+=b;
	e=b;
    f=b;
	do
	{
		a++;
	    printf("\nInforme Altura %0.f:",a);
	    scanf("%f",&b);
	    
	    c+=b;
		
		if(b > e && b != 0)
		{
			e=b;
			a1=a;
		}
		else if(b < f && b != 0)
		{
			f=b;
			a2=a;
		}
    }
    while(b != 0);
    d=c/(a-1);
    printf("A media das alturas foi:%f",d);
    printf("\nA maior Altura e:%f do aluno:%f",e, a1);
    printf("\nA menor Altura e:%f do aluno:%f",f ,a2);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: