In this algorithm, we will be comparing two numbers. If the first number is greater then first number will be compared with the third number whichever number is greater print that. If the first number is smaller then compare second number with the third number, whichever is greater among two print that number.Read More →
If we took a number 4567 then the reverse of the number should be 7654. In this article, we will look at simple algorithm using which we can find the reverse of the number and also see its implementation in CRead More →
Natural Number is series of the number starting from 1 to infinity. It does not include 0 or negative numbers. In this article, we will write an algorithm to find the sum of Natural Numbers upto a number and explain the algorithm in simple wordsRead More →
Factors of a Number are the whole numbers which on multiplication of them form that number. For Eg. Factor of 12 are 2,4,6,3. 2 X 6 = 12 and 4 X 3 = 12 and their vice versa. In this article, we will look at the flowchart and algorithm to find Factors of a numberRead More →
Perfect number is a positive integer equal to the sum of its proper divisors. Sum of its proper divisor excludes the Number itself. Ex. For number 6, the divisors are 1, 2, 3 and 6. Now if we take sum of 1, 2, 3 and exclude the number itself (i.e. 6), the sum is 6. Hence, 6 is a perfect number. 6 is the smallest Perfect Number. Lets check the algorithm for Perfect NumberRead More →
In matrix Subtraction, one row element of first matrix is individually subtracted with corresponding column elements i.e. for 1st element at Position[0,0], the subtraction of first Matrices Position[0,0] will be subtracted with Second Matrices Position[0,0]. Let's see this in Mathematical equation, if A and B are the Matrix entered by user and we are storing subtraction in Matrix C, thenRead More →
In this program we will be counting the Frequency of characters.
Output: c-1, h-1, a-1, r-2, g-1, e-1.
You should have some knowledge of ASCII values or you can just check the ASCII table while understanding below code.
In this article, we will learn the Algorithm and Flowchart to count no. of Vowels, Consonants and Special Character in a string. In this algorithm we declare an array of characters which will be used to store the string.Read More →