cpp absolute value
#include
#include
using namespace std;
int main()
{
int fyear; //for first year
int ayear; //for second year
int diff; //to find the difference
cout<<"Please Enter the first year: ";
cin>>fyear;
cout<<"Please Enter the Second year: ";
cin>>ayear;
diff=ayear-fyear; //basically its the formula to get the difference between the years
cout<<"The difference between the years is: "<
|