In this program, You will learn how to find the second smallest element in an array in C#. C# Code: How to find the second smallest element in an array in C#. C# using System; public class Program { public static void...
Tag - C# If Examples
C# Program to Print all the Multiples of 13 which are Less than 100
C# Program to Print all the Multiples of 13 which are Less than 100. Here is source code of the C# Program to Print all the Multiples of 13 which are Less than 100. The C# program is successfully compiled and executed with...
Program to Find LCM of Two Numbers in C# Console
In this example, you will learn how to Find the LCM value of two numbers entered by user in C# Console. Pseudocode: INI BEGIN NUMBER n1 , n2 , lcm; OUTPUT "Enter first Number:"; INPUT n1 OUTPUT "Enter second Number:"; INPUT n2...
Program to check whether a number is prime or not in C# Console
Example to check whether an integer (entered by the user) is a prime number or not using for loop and if…else statement. A positive integer which is only divisible by 1 and itself is known as prime number. For example: 17...
Find Average of Even and Odd of N Numbers Entered by User
In this example, I’ll show How to Calculate average of even & odd of N numbers entered by user. Firstly, we will ask the user how many numbers to enter. Source Code: C# static void Main(string[] args) { int...
Month Number to A Month Name in C# Console Application
In this article we will learn how to convert month number to a month name in C# Console Application with array and if statement.
Finding the biggest of three numbers in C#
This article explains a simple C# program to determine the greatest number among three user inputs. It demonstrates how to use if-else conditions and logical operators to compare multiple values. This type of program is often...