1.8 – Multiple operations with different numbers

Question


Write a program to print a result of following operations

25 / 4 + 8

8 + 23 / 4 * 1 – 6 % 2

(36 + 4 – 3) * 2 / 3

-1 * 3 – 5 / 3


Solution

class MultipleOperations
    {
        static void Main(string[] args)
        {
            Console.WriteLine(25 / 4 + 8);       //write given equation inside the brackets in console.writeline, thats it.
            Console.WriteLine(8 + 23 / 4 * 1 – 6 % 2);
            Console.WriteLine((36 + 4 – 3) * 2 / 3);
            Console.WriteLine(-1 * 3 – 5 / 3);        }
    }

 Previous                                                Home                                                   Next


Output

8