Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <limits.h>
- int main(){
- int min = INT_MAX, max = INT_MIN, aktualis, db = 0, seged = 0, db2 = 0;
- while(scanf("%d", &aktualis) != EOF){
- db++;
- if(aktualis < min){
- min = aktualis;
- }else if(aktualis > max){
- max = aktualis;
- }
- seged = max - min;
- }
- if(db < 2){
- return 0;
- }
- db2 = (db - 1) * 200;
- printf("%d %d\n", seged, db2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement