/********************** 04-1-S.TXT ************************** *********** Prof. Dr. B. Bartning **************************/ - Remarks about solutions - ATTENTION, please, here are only program fragments, this file cannot be compiled as a whole!! - WITHOUT guarantee! - ************************************************************** 01 // selection 02 #include 03 int main() 04 { 05 int x, y, z, w; 06 cin >> x >> y >> z; 07 if (x>y) { 08 if (x>z) w=x; 09 else w=z; 10 } 11 else { 12 if (y>z) w=y; 13 else w=z; 14 } 15 cout << w << endl; 16 return 0; 17 } ************************************************************** (a) // Program outputs the maxmimum of three numbers which are inputted ************************************************************** (b) You are allowed to discard the two block delimiters in lines 07/10 and 11/14, but not 04/17. ************************************************************** (c) 05new double x, y, z, w; ************************************************************** (d) E. g.: - copy lines 07 until 14, - invert relational operators, - replace copied w by min, additional definition of min in 05, output in 15. ************************************************************** (e) Before 06: cout >> "Please, input three numbers, one after the other!" << endl; Instead of 15: cout << "The maximum of the three numbers is " << w <<"\nthe minimum of the three numbers is " << min << endl; **************************************************************