How to change interval [a,b] to (a,b]

How to change interval [a,b] to (a,b]?
Please,help me modificate this code to (a,b]
#include <iostream>
using namespace std;
int main()
{
int a, b;
cout << "Enter the value of a : ";
cin >> a;
cout << "Enter the value of b : ";
cin >> b;
for (int i = a; i <= b; i++)
{
if ((i % 7) == 4)
{
cout << i << " ";
}
}
cout << endl;

return 0;
The only difference between [a,b] and (a,b] is that a is not included in the latter. Could you see a way to change your loop so that it starts with the value that comes after a?
Topic archived. No new replies allowed.