In C++ I am trying to display the odd numbers and average the even numbers between two integers.
The following is the code i have thus far...
This is what I have thus far..but cant figure out how to only display the odd numbers...havent begun averaging the even numbers....:
using namespace std;
void main (void)
int num1, num2, num = 0;
cout << "Please enter the the two numbers" <<endl;
cin>> num1 >> num2;
while (num1++ < num2)
if(num1 % 2 ==0)
cout << num1;