Playground
#include <iostream> using namespace std; inline int max(int a, int b) { int n = a; if (b > a) n = b; return n; } int main() { cout << max(3, 4) << endl; //pechati '4' cout << max(2, 1) << endl; //pechati '2' int n = 3, p = 2; cout << max(n, p) << endl; //pechati '3' cout << max(p, n) << endl; //pechati '3' return 0; }
Input data
Program output
no input
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!