WAP to add and substract height of two students using classes and objects.

This code adds and substract height of 2 students. We have defined a class named height which has 4 different functions : 'enterdata' to enter the data, 'addheight' to add the heights, 'subheight' to substract the heights, 'dispdata' to display the final heights.

Code:
#include<iostream>
using namespace std;
class  height
{
    int feet,inches;
	int i1,i2,f1,f2,s1,s2,d1,d2;
public:
	void enterdata(void);
	void addheight(void);
	void subheight(void);
	void dispdata(void);
};
void height::enterdata(void)
{
	cout<<"enter first height in feet and inches"<<endl;
	cin>>f1>>i1;
	cout<<"enter 2nd height in feet and inches"<<endl;;
	cin>>f2>i2;
}
void height::addheight(void)
{
	s1=f1+f2;
	s2=i1+i2;
	if(s2>=12)
	{
		s2=s2-12;
		s1=1+s1;
	}
}
void height::subheight(void)
{
	if(f1>=f2 && i1>i2)
	{
		d1=f1-f2;
		d2=i1-i2;
	}
	else
	{
	d1=f2-f1;
	d2=i2-i1;	}
}
void height::dispdata(void)
{
    cout<< "Sum = "<<endl;
	cout<<s1<<" \" "<<s2<<" \' "<<endl;
	cout<< "Difference = "<<endl;
	cout<<d1<<" \" "<<d2<<" \' "<<endl;
}
int main()
{
	height h1;
	h1.enterdata();
	h1.addheight();
	h1.subheight();
	h1.dispdata();
}

Output