Tugas2.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { // Nama = Muhammad Afiful Rajab // Nim = 3420230016 float hargasatuan = 200000000.00; int jumlahbeli = 5; float subtotal; subtotal = hargasatuan * jumlahbeli; float diskon; diskon = hargasatuan * 0.1; float total; total = subtotal - diskon; cout<<"-------------------------------------------"<<endl; cout<<"Program Penjualan Mobil Avanza Reborn"<<endl; cout<<"-------------------------------------------"<<endl; printf("Harga satuan : Rp %.2f \n", hargasatuan); printf("Jumlah Beli : %d \n", jumlahbeli); cout<<"-------------------------------------------"<<endl; printf("Subtotal : Rp %.2f \n", subtotal); printf("Diskon 10 persen: Rp %.2f \n", diskon); printf("Total : Rp %.2f \n", total); cout<<"-------------------------------------------"<<endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines