#include<iostream.h>
#include<conio.h>
const PHI = 3.14;
class Lingkaran {
private :
double jari2;
public :
void setJari2(double jari2){ this->jari2 = jari2;}
double getJari2(){ return jari2;}
double getLuas(){return PHI * jari2 * jari2;}
};
void main() {
Lingkaran a;
double jari;
cout << "Masukan Jari-jari ";
cin >> jari;
a.setJari2(jari);
cout << "Luas Lingkaran adalah = " << a.getLuas() << endl;
getche();
}
-