Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- int main()
- {
- int n[5] = {2,5,3,6,8};
- int max = n[0], min = n[0];
- int i;
- for(i=0; i<5; i++)
- {
- if(max < n[i])
- max = n[i];
- else if (min > n[i])
- min = n[i];
- }
- int div = max - min;
- printf("%d - %d = %d",max,min, div);
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement