#include <cstdlib>
#include <iostream>
using namespace std;
class segi{
private:
double a,t,l;
public:
double in();
double pros();
};
double segi::in(){
cout<<"Alas :";
cin>>a;
cout<<"Tinggi :";
cin>>t;
}
double segi::pros(){
l=(a*t)/2;
cout<<"Luas= "<<l<<endl;
}
int main(int argc, char *argv[])
{
segi x;
x.in();
x.pros();
system("PAUSE");
return EXIT_SUCCESS;
}
Tidak ada komentar:
Posting Komentar