Program pengisian BBM (Looping)
Program pengisian BBM (Looping) 1. RAPTOR 2. DEV C++ Syntax dalam bahasa C++ #include <iostream> #include <string> #include <cstdlib> #include <math.h> using namespace std; int main(){ int liter; float i; int harga; float i1; int liter1; int tot_harga; int bbm; cout << "Masukkan pilihan jenis bahan bakar\n(1) PREMIUM\n(2) PERTAMAX "; cout << "\nPilhan = "; cin >> bbm; if (bbm==1){ i = 1; harga = 6900; cout << "Akan membeli berapa liter? "; cin >> liter; cout << "Anda membeli PREMIUM, sebanyak "<<liter<<" liter.\nPENGISIAN DIMULAI........" << endl; liter1 = liter * 10; while (!(i>liter1)){ i1 = (i/10); cout << i1 << endl; tot_harga = i1 * harga; i = i+1; } cout << "PENGISIAN SELESAI !\nAnda harus m