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.

Summary

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



PLEASE DISABLE ADBLOCKER AND SUPPORT US!

Please support us by enabling ads on this page. Refresh

YOU DON'T LIKE ADS, WE ALSO DON'T LIKE ADS!
 
But we have to show ads on our site to keep it free and updated. We have to pay huge server costs, domain costs, CDN Costs, Developer Costs, Electricity and Internet Bill. Your little contribution will encourage us to regularly update this site.