The Standard Form of a Quadratic Equation looks like this: ax2 + bx + c = 0 The term b2-4ac is known as the discriminant of a quadratic equation. The discriminant tells the nature of the roots. If...
Tag - Algorithm Examples in C#
Convert Dollars to Cents in C#
1 dollars =100cent Solution 1: Calculate in Main Method C# class Program { static void Main(string[] args) { double dollar_amount; int cents; // int compute_cents; Console.Write("Enter dollar amount :"); dollar_amount = Convert...
Program Library Fine Calculation in C#
Library Fines ,this program was created to solve Library Fines problem. The fee structure is as follows: If the book is returned on before 5 days, no fine will be charged. If the book is returned after the expected...
Armstrong Number Program in C# Using While Loop
Let’s write a C# program to check whether the given number is armstrong number or not. Armstrong Number in Java: A positive number is called armstrong number if it is equal to the sum of cubes of its digits for...
Program to Find Leap Year in C#
This C# Program Checks Whether the Entered Year is a Leap Year or Not. One year has the length of 365 days, 5 hours, 48 minutes and 45 seconds.This is hard to calculate with, so a normal year has been given 365 days and a leap...
C# Program to check Armstrong Number
To check whether a number is an Armstrong number or not an Armstrong number in C# programming language. An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself...
Palindrome Number Series in C#
What is palindrome :A palindrome is a word, phrase, number or sequence of words that reads the same backwards as forwards. Punctuation and spaces between the words or lettering is allowed. Example 1: First example...
Checking for Palindrome Strings or Numbers in C#
Checking for Palindrome Strings or Numbers in C# C# static void Main(string[] args) { Console.Write("Enter something for to check that is it palindrome :"); string text = Console.ReadLine(); int len = text.Length; bool flag =...
Calculate Square Root Without Using Math.Sqrt in C#
Finding square root of a number without using Math.Sqrt Method in C# Console Application You may also like: Calculate Square Root Without Using Math.Sqrt in C# Calculate Square Root Without Using Sqrt in C First...
Find Numbers Above and Below the Average in C#
In this example, you will learn how to count the numbers in array, which are below than average number and above than average number.