Prgram



#include<iostream>
using namespace std;
class student{
float inch;
float feet;
float add;
public:
float dist(float a,float b){
inch=a;
feet=b;
add=inch+feet;
return add;
}
void display(){
cout<<add;
}
};
int main(){
student d1;
d1.dist(12.3,23.3);
d1.display();
return 0;
}

No comments:

Post a Comment