PROGRAM PENYEWAAN PENYEMPROTAN TANAMAN C++

 #include<iostream>

using namespace std;


int main()

{

string nama;

int luas;

int tipe,biaya,potongan1,potongan2,jumpot;

system("Color c");

cout << "==================================" <<endl;

cout << "Tugas2 algoritma dan pemrograman" <<endl;

cout << "ZAINAL ABIDIN" <<endl;

cout << "A TEKNIK INFORMATIKA" <<endl;

cout << "STMIK DIPANEGARA MAKASSAR" <<endl;

cout << "==================================" <<endl;

cout << "Masukkan Data Petani =";

getline(cin,nama);

cout << "Luas Lahan =";

cin >> luas;

cout << " Tipe Pemyemprotan =";

cin >> tipe;

switch(tipe){

case 1 : biaya = luas * 250000;

break;

case 2 : biaya = luas * 500000;

break;

case 3 : biaya = luas * 750000;

break;

case 4 : biaya = luas * 1250000;

break;

default:{

cout << "========================="<<endl;

cout << "TIPE PENYEMPROTAN SALAH ULANGI!!!" <<endl;

exit(0);

}

}

if ( luas > 100 ){

potongan1 = 0.1 * biaya;

}else{

potongan1 = 0.0;

}

biaya = biaya-potongan1;

if (biaya > 150000000 ){

potongan2 = 0.1 * ( biaya-150000000);

}else{

potongan2 = 0.0;

}

biaya=biaya- potongan2;

    jumpot = potongan1 + potongan2;


cout << "========================"<<endl;

cout << "Mendapatkan potongan RP."<<jumpot<<endl;

cout << " Dan Harus Membayar Biaya RP."<<biaya<<endl;

cout<<" ______________________________________"<<endl;

cout<<" ================================================================================================================== "<<endl;

cout<<"|          oooooooo  oooooo ooooooo   oo  oooo   oooo     oo       oo  oo     oo       ooooo   oo   oo   oo         |"<<endl;

cout<<"|             oo     oo     oo     o  oo  oo o   o oo   oo  oo     oo oo    oo  oo    oo       oo   oo   oo         |"<<endl;

cout<<"|             oo     ooooo  oo ooo o  oo  oo   o   oo  oo    oo    oooo    oo    oo  ooooooo   oo   ooooooo         |"<<endl;

cout<<"|             oo     oo     oo  oo    oo  oo       oo  oo====oo    oo oo   oo====oo      oo    oo   oo   oo         |"<<endl;

cout<<"|             oo     oooooo oo    oo  oo  oo       oo  oo    oo    oo  oo  oo    oo  ooooo     oo   oo   oo         |"<<endl;

cout<<"|______________________________________"<<endl;

cout<<" =================================================================================================================="<<endl<<endl;

return 0;

}

Subscribe to receive free email updates:

0 Response to "PROGRAM PENYEWAAN PENYEMPROTAN TANAMAN C++"

Post a Comment