Tugas2.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; //Nama: Fara Novri Hasbel Wijaya //NIM: 3420230017 int main() { // Membuat Variabel string nama = "Fara Novri", pesanan = "Jaket"; int jumlah = 2 , totalharga; float hargaawal; double harga, diskon, diskon_persen, harga_setelah_diskon; harga = 250000; // Menghitung total harga totalharga = harga * jumlah; //Meghitung harga awal hargaawal = totalharga; // Menghitung diskon diskon = totalharga * 0.25; harga_setelah_diskon = hargaawal - diskon; // Daftar harga cout << "====================================================" << endl; cout << "== Fara Clothing Store ==" << endl; cout << "====================================================" << endl; cout << " " << endl; cout << "========= Daftar Baju =========" << endl; cout << " " << endl; cout << "= 1. Jaket : Rp. 250.000 =" << endl; cout << "= 2. Hoodie : Rp. 350.000 =" << endl; cout << "= 3. Kemeja x Billie ellish : Rp. 400.000 =" << endl; cout << "====================================================" << endl; // Metode Output cout << "Nama Pembeli : " << nama << endl; cout << "Pesanan anda adalah : " << pesanan << endl; cout << "Jumlah pesanan anda : " << jumlah << endl; cout << "Harga Satu Pesanan : Rp. " << harga << endl; cout << "====================================================" << endl; // Menampilkan hasil cout << "Diskon (25%) : Rp. " << diskon << endl; cout << "Harga awal pesanan : Rp. " << hargaawal << endl; cout << "Total : Rp. " << harga_setelah_diskon << endl; cout << "====================================================" << endl; cout << " " << endl; cout << "== Terima Kasih Sudah Berbelanja Di Toko Kami ==" << endl; cout << " " << endl; cout << "====================================================" << endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines