Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int x = 4, t = 0, z = 0, aux = 0, aux1 = 0;
- float foto[4];
- for (t = 0; t < 4; ++t)
- {
- scanf("%f", &foto[t]);
- }
- for (t = 0; t < 4; ++t)
- {
- aux = t;
- for (z = t + 1; z < 4; ++z)
- {
- if(foto[z] > foto[aux])
- {
- aux = z;
- }
- }
- aux1 = foto[t];
- foto[t] = foto[aux];
- foto[aux] = aux1;
- }
- printf("%.2f\n", foto[3]);
- printf("%.2f\n", foto[1]);
- printf("%.2f\n", foto[0]);
- printf("%.2f", foto[2]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement