0 svar
191 visningar
will sheza är nöjd med hjälpen
will sheza 25 – Fd. Medlem
Postad: 24 sep 2021 10:22

Skapa en simpel butik

Hej sitter här och försöker få att detta skriv när man väljer att skriva ut sin kundvagn.Just nu skrivs bara detta ut i konsolen.Vet att jag på något sätt måste skapa en eller två variabler som håller reda på antalet appplen,bananer och ägg som läggs i,men får det ej att fungera.

Tack Mvh William 

Githublänk:https://github.com/SwiftBinaryCode/Labb-2-FInal/tree/master/Labb%202%20FInal

Ser ut så här:

Product Name: Apple Price per product: 15,Amount of that product: ,Sum of this product:
Product Name: Banana Price per product: 25,Amount of that product: ,Sum of this product:
Product Name: Egg Price per product: 30,Amount of that product: ,Sum of this product:
The sum of all your products is: 70

Vill att det ska se ut så här i konsolen:

Product:Banana, 25 kr,4 bananas in total ,100kr,
Product:apple, 15kr ,4 apples in total ,60kr,
Total of the crate is 160 swedish kronor

Svara Avbryt
Close