#include <iostream.h>
#include <conio.h>
class volumekubus {
public:
void volume();
void hitung();
private:
float v,s;
};
void volumekubus::volume(){
cout<<"PROGRAM MENGHITUNG VOLUME KUBUS"<<endl;
cout<<"nilai s : "; cin>>s;
}
void volumekubus::hitung(){
v=s*s*s;
cout<<"Volume Kubus = " << v;
cout<<endl;
}
int main(){
volumekubus x;
x.volume();
x.hitung();
getch();
return 0;
}
0 komentar:
Posting Komentar