Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication1.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int input();
- int findmax(int a, int b);
- int findmin(int a, int b);
- int output(int minvalue, int maxvalue);
- int main()
- {
- /*int num1 = 54, num2 = 67, num3 = 87, num4 = 34, num5 = 21;
- int num6 = 78, num7 = 66, num8 = 88, num9 = 33;*/
- int num1, num2, max, min;
- input();
- cout << "Please enter the first number" << endl;
- cin >> num1;
- cout << "Please enter the second number" << endl;
- cin >> num2;
- max = findmax(num1, num2);
- min = findmin(num1, num2);
- output(max, min);
- return 0;
- }
- int input()
- {
- cout << "Accepted list of numbers are 54, 67, 87, 34, 21, 78, 66, 88, and 33." << endl;
- return 0;
- }
- int findmax(int a, int b)
- {
- if (a < b)
- cout << b << endl;
- else
- cout << a << endl;
- return 0;
- }
- int findmin(int a, int b)
- {
- if (a > b)
- cout << b << endl;
- else
- cout << a << endl;
- return 0;
- }
- int output(int minvalue, int maxvalue)
- {
- cout << "Maximum value is" << maxvalue << endl;
- cout << "Manimum value is" << minvalue << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement