Tugas 2.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { cout << "--------------------------------------"<<endl; puts("Program Penjualan Salad Buah"); cout << "--------------------------------------"<<endl; float Harga =15000; int Jumlah = 7; printf("Harga Satuan \t: %.2f \n", Harga); printf("Jumlah \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 : Syahazka Abna Fadillah"<<endl; cout << "NIM :1620230008"<<endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines