using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ProgrammingExamples { class Program { static void Main(string[] args) { // Declaring variables int value1; int value2; int subResult; double value3; double result; // Set the values value1 = 5; // int value2 = 9; // int value3 = 4.56; // double // Multiply numbers subResult = value1 * value2; // Divide numbers // Must use double for result result = subResult / value3; // Warning if you dividing integers // you will need a cast to get the // correct result result = 5 / 10; // INCORRECT Result is 0.0 result = (double)5 / 10; // CORRECT Result is 0.5 } } }