Tugas2.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include <iomanip> using namespace std; //Miko Ardiansyah //3420230005 int main() { float harga_satuan = 10250.75; int jumlah_beli = 6; float subtotal, diskon, total; subtotal = harga_satuan * jumlah_beli; diskon = subtotal * 0.10; total = subtotal - diskon; cout << "----------------------------------------" << endl; cout << "Program Penjualan Marshmallow Plain" << endl; cout << "----------------------------------------" << endl; cout << fixed << setprecision(2); cout << "Harga Satuan : Rp " << harga_satuan << endl; cout << "Jumlah Beli : " << jumlah_beli << endl; cout << "----------------------------------------" << endl; cout << "Subtotal : Rp " << subtotal << endl; cout << "Diskon 10 Persen : Rp " << diskon << endl; cout << "Total : Rp " << total << endl; cout << "----------------------------------------" << endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines