Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IFF - Programação Estruturada
- //Lista de Exercícios - Exercício 1
- #include<stdio.h>
- #include<stdlib.h>
- int escolherMaior(){
- int maior, numero;
- for(int i=0;i<20;i++){
- printf("Entre com o %d° valor: ",i+1);
- scanf("%d",&numero);
- if(i==0) maior=numero;
- if(numero>maior) maior=numero;
- }
- return maior;
- }
- int main(){
- setbuf(stdout, NULL);
- printf("O maior valor foi: %d", escolherMaior());
- }
Advertisement
Add Comment
Please, Sign In to add comment