Jumat, 05 Oktober 2012

Portofolio Uji Kompetensi SDATA02

20.28


1.      Source code yang sudah dirubah :
#include
#include

using namespace std;

class hit{
      private:
              double s,l,p,t,luba,voba,luku,voku;
              double as,ts,tp,lp,vp,ls,ks;
              double pi,r,vobo,lubo;
      public:
             double lubaku();
             double lupris();
             double lubol();
             };
            
double hit::lubaku(){
    cout<<"input lebar:";
    cin>>l;
    cout<<"input panjang:";
    cin>>p;
    cout<<"input tinggi:";
    cin>>t;
    cout<<"input sisi kubus:";
    cin>>s;
    luba=2*((p*l)+(p*t)+(l*t));
    voba=p*l*t;
    luku=6*(s*s);
    voku=s*s*s;
    cout<<"Volum Kubus: "<
    cout<<"Volume Balok: "<
    cout<<"Luas Permukaan Kubus: "<
    cout<<"Luas Permukaan Balok: "<
    cout<
    }
   
double hit::lupris(){
    cout<<"input alas segitiga: ";
    cin>>as;
    cout<<"input tinggi segitiga: ";
    cin>>ts;
    cout<<"input tinggi prisma: ";
    cin>>tp;
    ls=0.5*(as*ts);
    ks=(2*ts)+as;
    lp=(2*ls)+(ks*tp);
    vp=ls*ts;
    cout<<"Volume Prisma: "<
    cout<<"Luas Permukaan Prisma: "<
    cout<
}

double hit::lubol(){
       cout<<"input jari-jari: ";
       cin>>r;
       pi=3.14;
       lubo=4*pi*(r*r);
       vobo=pi*(r*r*r);
       cout<<"Luas Permukaan Bola: "<
       cout<<"Volume Bola: "<
       cout<
       }

   
int main(int argc, char *argv[])
{
    hit c;
    c.lubaku();
    c.lupris();
    c.lubol();
    system("PAUSE");
    return EXIT_SUCCESS;
}

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 komentar:

Posting Komentar

 

© 2013 Raizexe Blog. All rights resevered. Designed by Templateism

Back To Top