Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- main(){
- int n, ultimo, atual, crescente = 1;
- printf("Quantos numeros serao digitados? ");
- scanf("%d", &n);
- printf("Digite um numero: ");
- scanf("%d", &ultimo);
- for(n; n > 1; n--){
- printf("Digite um numero: ");
- scanf("%d", &atual);
- if(atual < ultimo) crescente = 0;
- ultimo = atual;
- }
- if(crescente) printf("e crescente");
- else printf("nao e crescente");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement