46: Write a program to determine the maximum of two number
// Write a program to determine the maximum of two number
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float num1, num2, maxi;
cout << "Enter first number: ";
cin >> num1;
cout << "Enter second number: ";
cin >> num2;
maxi=max(num1, num2);
cout << "The maximum between " << num1 << " and " << num2 << " is " << maxi << endl;
return 0;
}
Comments
Post a Comment