Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main
- {
- int vetor[20],i,menorvalor=0,maiorvalor=0;
- i=0;
- for(i=0;i<20;i++)
- {
- printf("Digite um valor para o vetor");
- scanf("%d", &vetor[i]);
- if(vetor[i]>maiorvalor)
- {
- maiorvalor=vetor[i];
- }
- if(vetor[i]<menorvalor)
- {
- menorvalor=vetor[i];
- }
- i=i++
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement