Back To C++ Structures
//program to create a structure distance with members (feet and inches), two structure variables are created #include
#include
struct distance { int feet; int inches; }; void main() { clrscr(); distance a,b; cout<<"\nenter data for distance a "; cout<<"\nenter feet "; cin>>a.feet; cout<<"\nenter inches "; cin>>a.inches; cout<<"\nenter data for distance b "; cout<<"\nenter feet "; cin>>b.feet; cout<<"\nenter inches "; cin>>b.inches; cout<<"\ndisplaying the values of distance a\n"; cout<<"\nfeet = "<