Tugas2.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { // Nama : zaky nurmuhadi // NIM : 3420230010 int jumlah_beli; float harga_satuan, sub_total, diskon, total; jumlah_beli = 6; harga_satuan = 10250.75; sub_total = jumlah_beli * harga_satuan; diskon = sub_total * 0.1; total = sub_total - diskon; cout << "===============================" << endl; cout << "Program Penjualan Marshmallow Plain" << endl; cout << "===============================" << endl; printf("Harga satuan : %.2f \n", harga_satuan); printf("jumlah beli : %d \n", jumlah_beli); cout << "===============================" << endl; printf("Subtotal : %.2f \n", sub_total); printf("Diskon : %.2f \n", diskon); printf("total : %.2f \n", total); cout << "===============================" << endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines