Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #include "simpio.h"
- #include "genlib.h"
- main()
- {
- int prot, reat, apdif, time;
- char* diff;
- printf("Dwse provlepomeno xrono:");
- prot = GetInteger();
- printf("Dwse pragmatiko xrono:");
- reat = GetInteger();
- time = reat - prot;
- if (prot < 30)
- {
- apdif = 1;
- }
- else if (prot < 60)
- {
- apdif = 2;
- }
- else if (prot < 90)
- {
- apdif = 3;
- }
- else if (prot < 120)
- {
- apdif = 4;
- }
- else if (prot < 180)
- {
- apdif = 6;
- }
- else if (prot < 240)
- {
- apdif = 8;
- }
- else if (prot < 360)
- {
- apdif = 13;
- }
- else
- {
- apdif = 17;
- }
- if (time < 0)
- {
- if (time < (-apdif))
- {
- diff = 'SMALL';
- }
- }
- else if (time > 0)
- {
- if (time > apdif)
- {
- diff = 'BIG';
- }
- }
- else
- {
- diff = 'GOOD';
- }
- printf("Apodekti diafora : %d\n", apdif);
- printf("Pragmatiki diafora : %d \n", time);
- printf("%s\n", diff);
- system("PAUSE");
- }
Add Comment
Please, Sign In to add comment