Growth record if statement output from large to small numbers, growth record if
# Include <stdio. h> void main () {float a, B, c, d, e, f, g, t; scanf ("% f, % f, % f, % f ", & a, & B, & c, & d, & e, & f, & g); if (a> B) {t = a; a = B; B = t;} if (a> c) {t = c; c = a; a = t;} if (a> d) {t = d; d = a; a = t;} if (a> e) {t = e; e = a; a = t;} if (a> f) {t = f; f = a; a = t;} if (a> g) {t = g; g = a; a = t;} if (B> c) {t = c; c = B; B = t;} if (B> d) {t = d; d = B; B = t;} if (B> e) {t = e; e = B; B = t;} if (B> f) {t = f; f = B; B = t;} if (B> g) {t = g; g = B; B = t;} if (c> d) {t = d; d = c; c = t;} if (c> e) {t = e; e = c; c = t;} if (c> f) {t = f; f = c; c = t;} if (c> g) {t = g; g = c; c = t;} if (d> e) {t = e; e = d; d = t;} if (d> f) {t = f; f = d; d = t;} if (d> g) {t = g; g = d; d = t;} if (e> f) {t = f; f = e; e = t;} if (e> g) {t = g; g = e; e = t;} if (f> g) {t = g; g = f; f = t;} printf ("%-5.2f, % 5.2f, % 5.2f, % 5.2f, % 5.2f, % 5.2f, % 5.2f, % 5.2f \ n ", a, B, c, d, e, f, g );}
Replace with the intermediate variable t
Use a to compare the size, then B, and then c... finally determine the size of f and g.
Output