Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int data[110];
- int main(){
- int n;
- scanf("%d",&n);
- int min = 1100,max = -1;
- for(int i = 0;i < n;++i){
- int input;
- scanf("%d",&input);
- if(input < min) min = input;
- if(input > max) max = input;
- }
- printf("%d",max-min);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement