Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void kolos1()
- {
- float a;
- float b;
- float c;
- float d;
- scanf("%f", &b);
- scanf("%f", &c);
- scanf("%f", &d);
- int maxR = 0;
- if ((b==c && c==d) || (b<c && c<d) || (b>c&&c>d))
- {
- do
- {
- a = b;
- b = c;
- c = d;
- if (maxR < abs(a - b))
- {
- maxR = abs(a - b);
- }
- scanf("%f", &d);
- } while ((b == c && c == d) || (b<c && c<d) || (b>c&&c>d));
- if (maxR < abs(b - c))
- {
- maxR = abs(b - c);
- }
- }
- else
- {
- maxR = abs(b - c);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement