#include<iostream>
#include<stdlib.h>
using namespace std;
main()
{
int upperlimit, lowerlimit, sum=0;
cout<<"please enter lower limit (Greater > 0 ) = ";
cin>>lowerlimit;
if (lowerlimit>0)
{
cout<<"please enter upper limit (Greater > lower limit) = ";
cin>>upperlimit;
if (upperlimit>lowerlimit)
{
for(int i=lowerlimit; i<=upperlimit; i++)
{
if(i%4==0)
{
sum=sum-i;
}
else
{
sum=sum+i;
}
}
cout<<"calculated number is = "<<sum<<endl;
}
else
{
cout<<"lower limit should be (greater > 0) ";
}
system("pause");
}
}