STAY TOGETHER

Kamis, 03 Desember 2009

SINTAX PROGRAM EKSEKUSI DUA BILANGAN

SINTAX PROGRAM EKSEKUSI DUA BILANGAN

#include

using namespace std;

float tambah(float a, float b);

float kurang(float c, float d);

float kali(float e, float f);

float bagi(float g, float h);

void panggil();

char nama [20];

void panggil(){

cout<<"Masukkan nama anda: ";cin.getline(nama,20);

cout<<"-------------------------------"<

cout<<"Selamat datang "<

cout<<"di program eksekusi 2 bilangan"<

cout<<"-------------------------------"<

}

float tambah(float a, float b){

float hasil;

hasil=a+b;

return hasil;

}

float kurang(float c, float d){

float hasil;

hasil=c-d;

return hasil;

}

float kali(float e, float f){

float hasil;

hasil=e*f;

return hasil;

}

float bagi(float g, float h){

float result;

result=g/h;

return result;

}

int main(){

float x,y,j,k,l,m;

panggil();

cout<<"masukkan bil 1? ";cin>>x;

cout<<"masukkan bil 2? ";cin>>y;

j= tambah(x,y);

k= kurang(x,y);

l= kali(x,y);

m= bagi(x,y);

cout<<"jadi hasilnya adalah:"<

cout<<"hasil tambah bil 1 dan bil 2: "<

cout<<"hasil kurang bil 1 dan bil 2: "<

cout<<"hasil kali bil 1 dan bil 2: "<

cout<<"hasil bagi bil 1 dan bil 2: "<

system("pause");

return 0;

}

2 Komentar:

Anonymous Hacker mengatakan...

seep..seep,,

4 Januari 2010 pukul 08.45  
Anonymous koncone hacker mengatakan...

ada yang lainnya gak,..

4 Januari 2010 pukul 08.46  

Posting Komentar

Berlangganan Posting Komentar [Atom]

<< Beranda