#include <cstdlib>
#include <iostream>
using namespace std;
class kll{
public:
int in();
int proses();
private:
int l,p,k;
};
int kll::in(){
cout<<"Masukan panjang: ";
cin>>p;
cout<<"Masukan lebar: ";
cin>>l;
}
int kll::proses(){
k=2*(p+l);
cout<<"Keliling ==> "<< k<<endl;
}
int main(int argc, char *argv[])
{
kll x;
x.in();
x.proses();
system("PAUSE");
return EXIT_SUCCESS;
}
Tidak ada komentar:
Posting Komentar