Selasa, 25 Maret 2014

Latihan Kelompok PPT Pertemuan 4

Diposting oleh Unknown di 09.15
Simulasi Pembelian Bahan Bakar

1. Deklarasi :
    Liter : Integer
    Uang : Integer
 
2. Deskripsi :
    Read (liter);
    Options Liter
    1. 1 liter 6500
    2. 2 liter 13000
    3. 3 liter 19500
       End (select)
       write (L)

C++:

class Fuel {
    Public :
                 void input();
                 void process ();
                 void output ();
    Private :
                int output;
                int liter;
};

void Fuel :: input (){
       cout<<"Enter The Price of Fuel : " ;
       cin>>output;
       cout<<"type of fuel : "; cin>>output;
}

void Fuel :: process(){
    output = liter * money
}

void Fuel :: output (){
cout<<"The Output Of The Process : "<<result;
}

int main(int argc, char * argv []) {
   Fuel X;
          X input ();
          X process ();
          X output ();
System ("pause");
Return exit_succes;
}/* Import to jeliot : */
{Public class fuel

void static void input ();
void static void process();
void static void output ();

private int output;
private int liter;
};
Public void input();{
system.out.print ("Enter the Price of fuel")
output=input.readint();
system.out.print("type of fuel");
output=input.readint();
}
Public void process(){
output=liter * money
}
Public void output(){
syetem.out.print("output of the process : " + result);
}

Public static void main(){
X = new fuel ();
X.input();
X.process();
X.output();
}}

0 komentar:

Posting Komentar

 

Rizka Site Copyright © 2012 Design by Antonia Sundrani Vinte e poucos