Simple Discount Calculator Based on Purchase Amount Introduction Discounts are an important concept in both programming and business. In retail or online shopping, discounts help customers save money and encourage more purchases. In this lesson, you’ll learn how to create…
C#
tutorials, lessons, articles and source codes on C# programming language
Check if a Number is Positive, Negative, or Zero
Check if a Number is Positive, Negative, or Zero Introduction In this lesson, we will explore how to use conditional statements in C# to determine whether a number is positive, negative, or zero. Conditional statements allow your program to make…
Check if Temperature is Comfortable in CSharp
Logical Operator Example – Check if Temperature is Comfortable (between 20°C and 30°C) Introduction of the Lesson Operators are the building blocks of decision-making in programming. They allow us to compare values, perform calculations, and make choices based on certain…
Check if a User is Eligible to Vote in CSharp
Check if a User is Eligible to Vote in C# Introduction of the Lesson Programming often involves making decisions based on certain conditions. One of the most practical examples is checking if a person is eligible to vote. In real…
Determine if a Number is Even or Odd in CSharp
Determine if a Number is Even or Odd in C# Introduction of the Lesson In the world of programming, numbers are not just for calculations—they also carry special properties that allow us to make decisions. One of the most common…
Check if a Number is Greater than Another Number in CSharp
Check if a Number is Greater than Another Number in C# Introduction of the Lesson In programming, we often need to compare values and make decisions based on the results. For example, you might want to know which student scored…
Basic Calculator (Add, Subtract, Multiply, Divide)
Basic Calculator (Add, Subtract, Multiply, Divide) Introduction of the Lesson Operators in programming are like tools that allow us to manipulate data. In C#, operators are used to perform calculations, make comparisons, and control logical decisions. Understanding operators is one…
Ask for Favorite Food and Print a Sentence in CSharp
Ask for Favorite Food and Print a Sentence Introduction One of the most fundamental skills in programming is learning how to interact with users by accepting input and displaying output. Input allows the user to provide data to the program,…
Input Birth Year and Display Age in CSharp
Input Birth Year and Display Age Introduction In computer programming, one of the most important skills to master is handling user input and program output. Input allows users to interact with a program by providing data, while output displays results…
Convert Temperature from Celsius to Fahrenheit in CSharp
Convert Temperature from Celsius to Fahrenheit in C# Introduction Temperature conversion is a common task in programming, especially in scientific, educational, and weather-related applications. For example, weather apps need to convert temperature values between Celsius and Fahrenheit depending on…