I have this assignment and I got most of the program but I cant seem to make the counter work right what am I doing wrong?
#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
int num1, num2, number;
cout << "Please enter an integer: ";
cin >> num1;
cin.ignore();
cout << "Please enter another integer: ";
cin >> num2;
for (int counter = 0; counter <= number; counter++)
{
int number = num2 % 2; (number % 2 && number >= counter);
cout << "The amount of even numbers between " << num1 << " and " << num2 << " is " << number;
break;
}
cout << endl;
}