You are on page 1of 1

Nama : Fritzdinand Hasoloan Sianturi

Nim : 190803097
Matkul : DASAR PEMROGRAMAN II

1. C. To member functions of that class.

2. Class leverage
{
private :
int crowbar :
public :
void pry( ) :
};

3. False, because both data and functions can be private or public.

4. Leverage lever1;

5. D. A class object and a member of that class

6. #include<iostream>
using namespace std;
float circarea(float radius);

int main()
{
double rad;
cout<<"\nEnter radius of circle: ";
cin>>rad;
cout<<"Area is "<<circarea(rad)<<endl;
return 0;
}
float circarea(float r)
{
const float PI = 3.14159F;
return r*r*PI;
}

Output :

You might also like