1. Course
  2. Functions C
  3. Return value from Main

Return value from Main

Last updated: 8/23/2020 Difficulty: Intermediate

Create a new version of the program Main parameter calculator where you can return the following error codes from Main:

  • Return 1 if the total parameters are different from 3.
  • Return 2 if the second parameter is not a valid arithmetic sign (+, -, x, *, /).
  • Return 3 if the first or third parameter is not a valid number.
  • Return 0 if everything is correct.


2 x 2




Functions C

4 / 6

Android App

Practice C# anywhere with the free app for Android devices.

Android App

Exercises C# by difficulty

Learn C# at your own pace, the exercises are ordered by difficulty.

Make a donation

Your donations support our work and contribute to the maintenance of the app.