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.41 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. int main(){
  6.  
  7. int min = 9999, max = 0, aktualis, db = 0, seged = 0;
  8.  
  9. while(scanf("%d", &aktualis) != EOF){
  10. db = db + 200;
  11.  
  12. if(aktualis < min){
  13. min = aktualis;
  14. }else if(aktualis > max){
  15. max = aktualis;
  16. }
  17. seged = max - min;
  18.  
  19. }
  20. if(db < 400){
  21. return 0;
  22. }
  23. printf("%d %d\n", seged, db - 200);
  24.  
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement