Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <limits.h>
  4.  
  5.  
  6. int main(){
  7.  
  8. int min = INT_MAX, max = INT_MIN, aktualis, db = 0, seged = 0, db2 = 0;
  9.  
  10. while(scanf("%d", &aktualis) != EOF){
  11. db++;
  12.  
  13. if(aktualis < min){
  14. min = aktualis;
  15. }else if(aktualis > max){
  16. max = aktualis;
  17. }
  18. seged = max - min;
  19.  
  20. }
  21. if(db < 2){
  22. return 0;
  23. }
  24. db2 = (db - 1) * 200;
  25. printf("%d %d\n", seged, db2);
  26.  
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement