Program Jajargenjang
#include <iostream>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
class jajargenjang{
int a, t;
public:
void sisi (int a, int y);
int luas (void){
return (a);
}
};
void jajargenjang::sisi (int x, int y){
a = x;
t = y;
}
int main(int argc, char** argv) {
jajargenjang persegi;
int x,y;
cout<<"masukkan alas : ";cin>>x;
cout<<"masukkan tinggi : ";cin>>y;
persegi.sisi(x,y);
cout<<"luas jajar genjang : "<<persegi.luas()*y;
return 0;
}
ABOUT THE AUTHOR
A web designer from India. And then you write some more information about yourself like this to fill out the space that is left.

0 komentar:
Posting Komentar