Don't like ads? PRO users don't see any ads ;-)

Lista 3 - exercício 19

By: ascarol on Aug 8th, 2012  |  syntax: C  |  size: 0.38 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. int main(){
  4.     int i,n,maiorvalor=0;
  5.     printf("Digite uma lista de 100 numeros:\n");
  6.     for(i=1; i<=100; i++)
  7.         {
  8.          printf("\nNumero %d: ",i);
  9.          scanf("%d",&n);
  10.          if(n>maiorvalor)
  11.             maiorvalor=n;
  12.          }
  13.          printf("\n\nO maior valor dos 100 numeros eh %d!!\n\n",maiorvalor);
  14.     return 0;
  15. }