Programming Exercise of C# Operator

In this chapter you will learn:
  • How to solve programming problems using C# operators?
  • How to use different type of operator in a program?
  • How to select best operator to solve programming exercises?
Qu1: Write a program to calculate (a+b)2.
Hint: (a*a + b*b + 2*a*b)
Qu2: Write a program to calculate formulae πr2.
Qu3: Write a program to check whether input number is even or odd.
Qu4: Write a program to calculate power of given number by user.
Qu5: Write a program to calculate area of triangle. Take required input from user and then calculate the area of triangle.


In this chapter, you did programming exercises of C# operators. In next session you will learn about different types of C# conditional constructs.

More Articles


Share your thought