Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 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;
  9.  
  10. while(scanf("%d", &aktualis) != EOF){
  11. db = db + 200;
  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 < 400){
  22. return 0;
  23. }
  24. printf("%d %d\n", seged, db - 200);
  25.  
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement