Quick actions

cmd+k|ctrl+k

Navigation

Languages

NgodingBareng

Snippet info

Language

Cpp

Visibility

public

Author

irsyadpurbha.fst

Created

2024-10-26T02:24:56.139141Z

Updated

2024-10-26T02:38:57.823328Z

#include <iostream>
using namespace std;

int main() {
    cout << "---------------------------------------"<<endl;
    puts("Program Penjualan Marshmallow Plain");    
    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 cape_bosen = harga * jumlah;
    float bete_kesel = cape_bosen * 0.1;
    float malah_pusing = cape_bosen - bete_kesel;

    printf("Subtotal \t: Rp. %.2f \n",cape_bosen);
    printf("Diskon \t\t: Rp. %.2f \n",bete_kesel);
    printf("Total \t\t: Rp. %.2f \n",malah_pusing);

    cout << "---------------------------------------"<<endl;
    
    cout << "Nama  : Irsyad Purbha" << endl;
    cout << "Email : [email protected]";
    return 0;
}
INFO