I'm trying to write a program with a loop that has the user enter 2 numbers and ends only when half the product of the 2 numbers entered is less than either number
Here is what i have so far:
Code:
#include <iostream.h>
int main()
{
// Declaring Variables
int hold;
int num1, num2;
int product;
// Inputting Numbers
cout << "Enter 1st number : ";
cin >> num1;
cout << "Enter 2nd number : ";
cin >> num2;
// While Loop
while (product !=0)
{
product = ((num1 * num2)/2);
cout << product << endl;
break;
}
cin >> hold;
return 0;
}