Guest User

Untitled

a guest
Nov 24th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include "simpio.h"
  4. #include "genlib.h"
  5. main()
  6. {
  7. int prot, reat, apdif, time;
  8. char* diff;
  9.  
  10. printf("Dwse provlepomeno xrono:");
  11. prot = GetInteger();
  12. printf("Dwse pragmatiko xrono:");
  13. reat = GetInteger();
  14. time = reat - prot;
  15. if (prot < 30)
  16. {
  17. apdif = 1;
  18. }
  19. else if (prot < 60)
  20. {
  21. apdif = 2;
  22. }
  23. else if (prot < 90)
  24. {
  25. apdif = 3;
  26. }
  27. else if (prot < 120)
  28. {
  29. apdif = 4;
  30. }
  31. else if (prot < 180)
  32. {
  33. apdif = 6;
  34. }
  35. else if (prot < 240)
  36. {
  37. apdif = 8;
  38. }
  39. else if (prot < 360)
  40. {
  41. apdif = 13;
  42. }
  43. else
  44. {
  45. apdif = 17;
  46. }
  47. if (time < 0)
  48. {
  49. if (time < (-apdif))
  50. {
  51. diff = 'SMALL';
  52. }
  53. }
  54. else if (time > 0)
  55. {
  56. if (time > apdif)
  57. {
  58. diff = 'BIG';
  59. }
  60. }
  61. else
  62. {
  63. diff = 'GOOD';
  64. }
  65. printf("Apodekti diafora : %d\n", apdif);
  66. printf("Pragmatiki diafora : %d \n", time);
  67. printf("%s\n", diff);
  68. system("PAUSE");
  69. }
Add Comment
Please, Sign In to add comment