#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int x=1;
float b, c, d, e, f, g;
char ver;
do
{
printf("\n\nInforme Temperatura %i:",x);
scanf("%f",&b);
f=b;
g=b;
d+=b;
e=d/x;
if(b > g)
{
g=b;
}
else if(b < f)
{
f=b;
}
printf("Proximo Valor? (S ou N):\n");
scanf(" %c",&ver);
if(ver == 'S')
{
x++;
}
else if(ver == 'N')
{
printf("\n\n\n\n\nMedia:\n%f", e);
printf("\n\n\n\n\nMenor Temp.:\n%f", f);
printf("\n\n\n\n\nMaior Temp:\n%f", g);
}
}
while(ver == 'S');
}
To embed this project on your website, copy the following code and paste it into your website's HTML: