Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* CABEÇALHO
- Arquivo: LISTA 03 - Exercicio 19.c
- Objetivo: Informe o maior valor de uma lista de numeros.
- Autor(a): Ramon Borges
- */
- #include <stdio.h>
- #define quantNum 10
- int main()
- {
- int i, numero, maior;
- for(i = 1; i <= quantNum; i++)
- {
- printf("\nInforme o algarismo: ");
- scanf("%d", &numero);
- if(i == 1)
- maior = numero;
- else
- if(numero > maior)
- maior = numero;
- }
- printf("\nO MAIOR NUMERO E %d\n", maior);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment