skip to Main Content

Visual Studio Code – I want to write a cashier program using C# while, it should add the final total but it just keeps showing the price right underneath

I wanted it to look like this: And here's my result: This is my code private static void Main(string[] args) { Console.WriteLine("CASHIER"); Console.WriteLine("Enter Quantity of Products: "); int qty = Convert.ToInt32(Console.ReadLine()); if (qty > 5) { Console.WriteLine("Maximum of 5 products");…

VIEW QUESTION

How to shuffle cards in javascript?

let cards = ["A","2","3","4","5","7","8","9","10","J","Q","K"]; shuffle(cards); console.log(cards); function shuffle(array){ let currentindex = array.length; while (currentindex !=0) { let randomcards = Math.floor(Math.random()* array.length) currentindex -=1; let temp = array[currentindex]; array[currentindex] = array[randomcards]; array[randomcards] = temp} return array } My teacher taught me…

VIEW QUESTION
Back To Top
Search