Choose and explain in your own words the idea of only one program of the following, then produce a flowchart. Use correc
Posted: Tue May 24, 2022 8:24 am
https://app.diagrams.net/).
#include <iostream> #include <iomanip> using namespace std; int findMax (int, int); int main() { int firstnum, secnum, max; cout << "\nEnter a number: "; cin >> firstnum; cout << "Enter a second number: "; cin >> secnum; max = findMax (firstnum, secnum); cout << "\nThe maximum of the two numbers is " << max << endl; return 0; int findMax (int x, int y) { int maximum; if (x >= y) maximum = x; else maximum =y; return maximum; }
Choose and explain in your own words the idea of only one program of the following, then produce a flowchart. Use correct symbols (this is a suggested website to draw flowcharts: #include <iostream> #include <iomanip> using namespace std; int findMax (int, int); int main() { int firstnum, secnum, max; cout << "\nEnter a number: "; cin >> firstnum; cout << "Enter a second number: "; cin >> secnum; max = findMax (firstnum, secnum); cout << "\nThe maximum of the two numbers is " << max << endl; return 0; int findMax (int x, int y) { int maximum; if (x >= y) maximum = x; else maximum =y; return maximum; }