Search⌘ K
AI Features

Exercise 1: Function To Check Sum

Learn to write a C# method that takes two integers, computes their sum, and uses conditional statements to determine if the sum is less than, equal to, or greater than 100. This exercise helps you understand method parameters, return values, and conditional checks.

We'll cover the following...

Problem Statement

Write a method checkSum which

  • Takes two integers num1 and num2.

    • pass by value method is used to pass the arguments to method.
  • Has a check variable whose value gets updated as explained below. ...