Run ❯
Get your
own C#
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
using System; namespace MyApplication { class Program { static void Main(string[] args) { int[] prices = {10, 20, 30}; int total = 0; for (int i = 1; i < prices.Length; i++) { Console.WriteLine("i is " + i + ", price is " + prices[i]); total = total + prices[i]; } Console.WriteLine(total); } } }
i is 1, price is 20
i is 2, price is 30
50