You are on page 1of 1

#include<stdio.

h>
int main()
{
int i, V[5];
float media;
for(i=; i<5; i++)
/*obter dados*/
{
printf("V[%d]= ", i);
scanf("%d", &V[i]);
fflush(stdin);
}
/* Media*/
float soma=0.0
for(i=0; i<5; i++)
{
soma = soma + V[i]
}
printf("a media e: %f\n", soma/5.0
/*mastra valores do vetor*/
for(i=0; i<5; i++)
printf("V[%d]", i, V[i]);
/* inverter o valor*/
int temp;
for(i=0; i<2; i++)
{
temp=VETOR[i];
VETOR[i]=VETOR[4-i];
VETOR[4-i]=temp;
}

for(i=0; i<5; i++);


printf("V[%d]", i, V[i]);
}

You might also like