I do not know where I'm going wrong and are printing incorrect media values.
#include <stdio.h>
int main (){
int i, num, soma, maior, menor;
float media;
printf ("Informe 10 valores:\n");
for (i=1; i<=10; i++){
scanf ("%d", &num);
if (i==0){
maior=num;
menor=num;
}
else{
if (num > maior){
maior=num;
}
if (num < menor){
menor=num;
}
}
soma = soma + num;
media = soma / 10;
}
printf ("Media: %.2f", media);
printf ("\nMaior: %d", maior);
printf ("\nMenor: %d", menor);
}