#include <iostream>
using namespace std;
int main() {
int pjg_tnh,lbr_tnh,pjg_rmh,lbr_rmh,luas_tnh,luas_rmh,trf_waktu,ttl_tarif,wkt_rr_pemotongan,wkt_pengerjaan,sisa_tnh;
trf_waktu = 100000/60; //per jam atau per 60 menit
wkt_rr_pemotongan = 2; // meter per menit
cout << "-----------------------------------" << endl;
cout << "Menghitung Tarif Pemotong Rumput" << endl;
cout << "-----------------------------------" << endl;
cout << endl;
cout << "-----------------------------------" << endl;
cout << " Bidang Tanah " << endl;
cout << "-----------------------------------" << endl;
cout << "Panjang Tanah (m) : ";cin >> pjg_tnh;
cout << "Lebar Tanah (m) : ";cin >> lbr_tnh;
cout << endl;
cout << "-----------------------------------" << endl;
cout << " Bidang Rumah " << endl;
cout << "-----------------------------------" << endl;
cout << "Panjang Rumah (m) : ";cin >> pjg_rmh;
cout << "Lebar Rumah (m) : ";cin >> lbr_rmh;
cout << endl;
luas_tnh = pjg_tnh*lbr_tnh;
luas_rmh = pjg_rmh*lbr_rmh;
sisa_tnh = luas_tnh-luas_rmh;
wkt_pengerjaan = sisa_tnh/wkt_rr_pemotongan;
ttl_tarif = wkt_pengerjaan*trf_waktu;
cout << "------------------------------------------" << endl;
cout << "Luas Tanah (m2) : " << luas_tnh << endl;
cout << "Luas Rumah (m2) : " << luas_rmh << endl;
cout << "------------------------------------------" << endl;
cout << "Sisa Tanah Yang Tersedia (m2) : " << sisa_tnh << endl;
cout << "------------------------------------------" << endl;
cout << "Rata-rata Pemotongan rumput : 2m / menit" << endl;
cout << "Lama Pengerjaan (menit) : " << wkt_pengerjaan << endl;
cout << "Tarif per 60menit : Rp.100.000" << endl;
cout << "------------------------------------------" << endl;
cout << endl;
cout << "Tarif Yang Harus Dibayar : Rp." << ttl_tarif << endl;
return 0;
}
0 komentar:
Posting Komentar