C#C
C#3y ago
7 replies
Quan

C# help CS0103

I followed directions can someone tell me what i did wrong
int[] salesValues = { 1000, 1500, 1800, 2600, 2500, 900 };

int runningTotal = 0;

// Clear the ListBox for each calculation

lstSales.Items.Clear();

// Calculate and display running total

foreach (var value in salesValues)

{

runningTotal += value;

lstSales.Items.Add($"Running Total: {runningTotal}");

}
help1.PNG
help2.PNG
helpxd.PNG
Was this page helpful?