#include <cstdlib>
#include <iostream>
using namespace std;
class segitiga {
public :
segitiga ();
void input();
void proses();
private :
int a;
int b;
int c;
int keliling;
};
segitiga::segitiga(){
cout<<"=================================\n";
cout<<"Menghitung Keliling Segitiga\n";
cout<<"=================================\n";
}
void segitiga::input (){
cout<<"Masukkan Panjang Sisi A = ";
cin>>a;
cout<<"Masukkan Panjang Sisi B = ";
cin>>b;
cout<<"Masukkan Panjang Sisi C = ";
cin>>c;
}
void segitiga::proses(){
keliling=a+b+c;;
cout<<"Keliling : "<<keliling;
}
int main(int argc, char *argv[]){
segitiga sgtga;
sgtga.input();
sgtga.proses();
return 0;
}
Raptor :
Comments
Post a Comment