Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
26 lines (24 sloc)
428 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// IO Exercise. | |
#include <iostream> | |
#include <string> | |
int Max(int a, int b) | |
{ | |
if (a > b) | |
{ | |
return a; | |
} | |
else | |
{ | |
return b; | |
} | |
} | |
int main() | |
{ | |
int value1 = 0; | |
int value2 = 0; | |
std::cout << "Please input number 1: "; | |
std::cin >> value1; | |
std::cout << "Please input number 2: "; | |
std::cin >> value2; | |
std::cout << "The highest number is " << Max(value1, value2); | |
} |