#15_Functions and Function Prototype in C++
#include <iostream>
using namespace std;
// Functions and Function Prototype
int max_num(int x, int y)
{
if (x > y)
{
return x;
}
else
{
return y;
}
}
void gm_greet();
int main()
{
int a, b;
cout << "Enter two numbers to get maximum number : " << endl;
cin >> a >> b;
int max = max_num(a, b);
cout << "The maximum number is : " << max << endl;
gm_greet();
gm_greet();
gm_greet();
return 0;
}
void gm_greet()
{
cout << "Hello User...GOOD MORNING" << endl;
}
Comments
Post a Comment