Problem: console application “Expression”

Write a C# console program, which calculates and prints the value of the following numerical expression:

(3522 + 52353) * 23 - (2336 * 501 + 23432 - 6743) * 3

Warning: it is not allowed to previously calculate the value (for example with Windows Calculator).

Hints and Guidelines

We make a new C# console project with name "Expression". We find the method static void Main(string[] args) and go into its body between { and }. After that we have to write the code, which calculates the above numerical expression and prints its value on the console. We put the above numerical expression inside the brackets of the command Console.WriteLine(…):

We start the program with [Ctrl+F5] and check if the result is the same as the one in the picture:

Testing in the Judge System

Test your solution here: https://judge.softuni.bg/Contests/Practice/Index/503#1.

results matching ""

    No results matching ""