Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- float min, max, n;
- int i = 0;
- scanf("%f", &n);
- min = max = n;
- while (i < 6) {
- scanf("%f", &n);
- if (n < min)
- min = n;
- else if (n > max)
- max = n;
- ++i;
- }
- printf("Min: %.2f, max: %.2f.", min, max);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement