Tugas2.1A

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { int Jumlah; float Harga_Per_Satuan, Subtotal, diskon_10_persen, Total; /* Nama variable bersifat case sensitive atau huruf besar dan kecil berpengaruh */ Jumlah = 6; Harga_Per_Satuan= 15.000; Subtotal = Jumlah * Harga_Per_Satuan; diskon_10_persen = Subtotal * 0.1; Total = Subtotal - diskon_10_persen; //Pemberian argumen harus sesuai dengan urutan yang ditampilkan cout <<"--------------------------------"<<endl; cout <<"Program Penjualan Katsu Mentai"<<endl; cout <<"---------------------------------"<<endl; printf("Harga Satuan = 15.000 \n"); printf("Jumlah Beli = 6\n"); cout <<"---------------------------------"<<endl; printf("Subtotal = 150.000\n"); printf("diskon_10_persen = 15.000\n"); printf("Total = 135.000 \n"); cout<<"---------------------------------"<<endl; ("Harga_Per_Satuan,Jumlah Beli, Subtotal, diskon_10_persen, Total\n"); cout<<"Nama : Nur Izzati Istiqlal"<<endl; cout<<"NIM : 1620230004"<<endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines