Tugas2.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { cout<<"---------------------------------"<<endl; puts("Program Penjualan Dark Coklat"); cout<<"---------------------------------"<<endl; float harga = 10000; int jumlah = 5; printf("Harga Satuan \t: %.2f \n",harga); printf("Jumlah \t\t: %d \n", jumlah); cout<<"---------------------------------"<<endl; float subtotal = harga * jumlah; float diskon = subtotal * 0.1; float total = subtotal - diskon; printf("Subtotal \t: Rp. %.2f \n",subtotal); printf("Diskon \t\t: Rp. %.2f \n",diskon); printf("Total \t\t: Rp. %.2f \n",total); cout<<"---------------------------------"<<endl; cout<<"Nama: Syifa Asih Nirwana"<<endl; cout<<"NIM: 1620230019"<<endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines