Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int maior = 0, i, n=0, aux = 0, pos;
- for(i=0; i<101; i++){
- scanf("%d", &n);
- if(n >= aux){
- maior = n;
- aux = maior;
- pos = i+1;
- }
- }
- printf("%d\n", maior);
- printf("%d\n", pos);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement