/* ************************************************************************** * Program name : 002_Find_Max_and_Min (Version 1.00) * * Author : Duck Wong * * Language : C / C++ * * Compiler : Boodshed Dec-C++ compiler Ver 3.95 * * Computer : PII350 * * O/S : Windows 98 * ************************************************************************** * Version 1.00 : 2000/06/03 - first version * ************************************************************************** * Description : (a) input 3 integer numbers * * (b) find Max & Min * * (c) calculate the average & sum of these numbers * * (d) output results * ************************************************************************** */ #include #include int main() { // part 1 : declaration int Integer1, Integer2, Integer3; int Max, Min, Sum, Product, Average1; float Average2; // part 2 : input 3 integer numbers cout << "Please input the 1st integer number : "; cin >> Integer1; cout << "Please input the 2nd integer number : "; cin >> Integer2; cout << "Please input the 3rd integer number : "; cin >> Integer3; cout << "\nThe numbers are : \a" << Integer1 << " " << Integer2 << " " << Integer3 << "\n\n"; // part 3 : Find the maximum & minimum Max = Integer1; if (Integer2>Max) Max = Integer2; if (Integer3>Max) Max = Integer3; Min = Integer1; if (Integer2