void main() {
String nama ="Indomaret";
String pabrik ="PT INDOMARET PRISMATAMA";
String alamat ="JL. RAYA LEMBAR,LEMBAR,LEMBAR,LOMBOK BARAT";
// Data belanjaan
List<String> items = ["Garnier.HC.NAT.6.64", "Garnier.ASH.BLNDE"];
List<double> prices = [19.500, 19.500];
// Menghitung total belanja
double total = 0;
for (int i = 0; i < items.length; i++) {
total += prices[i];
}
// Mencetak struk belanja
print("===== Struk Belanja =====");
for (int i = 0; i < items.length; i++) {
print("${items[i]}: \$${prices[i]}");
}
print("=========================");
print("Total: \$${total}");
}