[solved] – Question 81673
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int num;
do
{
cout << “Enter an integer: “;
cin >> num;
cout << “nNumber: ” << num;
if (num > 0)
cout << “nMagnitude: Positive”;
else if (num < 0)
cout << “nMagnitude: Negative”;
else
cout << “nMagnitude: Zero”;
if (num % 2 == 0)
cout << “nType: Even”;
else
cout << “nType: Odd”;
cout << “nn”;
}
while ();
return 0;
}
So I want the program to terminate the loop when the user enters a negative odd integer but I’ve been struggling to find the correct expression to fit.
Expert Answer
OR

