#include<iostream.h>
#include<conio.h>
class convert_to_metric{
int feet;
float inches;
public:
void length(int feetpart, float inchpart);
void convert_and_display();
};

void main(){         clrscr();
convert_to_metric oM;
oM.length(17,15.5);
oM.convert_and_display();

getch();
}

void convert_to_metric::length(int feetpart,float inchpart){
if(inchpart>=12){

feet=feetpart+inchpart/12;
inches=inchpart-(int(inchpart/12)*12);



cout<<feet<<"\n"<<inches<<endl;
}
}
void convert_to_metric::convert_and_display(){
float display_in_cm=(12*feet+inches)*2.54;
cout<<display_in_cm;
}

Checking account prog

#include<iostream.h>
#include<conio.h>
class checking_acct{
private:
int acctnum;
float acct_bal;
public:
checking_acct();
void input_transaction();
char C,ans;
int transaction;
void print_bal();
};

void main(){
clrscr();
checking_acct oAct;
do{

oAct.input_transaction();
cout<<"\nAnother transaction? y]es or n]o ";
cin>>oAct.ans;     clrscr();
}while(oAct.ans=='y');
getch();
}

checking_acct::checking_acct(){
cout<<"Input accout number: ";
cin>>acctnum;
cout<<"Input account balance: ";
cin>>acct_bal;
}

void checking_acct::input_transaction(){

cout<<"Input transaction D]eposit, W]ithdrawal, Balance I]nquiry, ";
cout<<"\nChoice: ";
cin>>C;

switch(C){

case 'D':
case 'd': cout<<"Input a value: ";
cin>>transaction;
acct_bal=acct_bal+transaction;
print_bal();
break;
case 'W':
case 'w': cout<<"Input a value: ";
cin>>transaction;acct_bal-=transaction;
print_bal();
break;
case 'I':
case 'i': cout<<acct_bal;break;
}
}

void checking_acct::print_bal(){
cout<<acctnum<<endl<<acct_bal;
}