an algorithm to check prime number

algorithm

An algorithm to check prime number A number that is divisible only by itself and 1, is prime number Example of prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23…. etc Algorithm Step 1: Start Step 2: Declare variables n,i,flag. Step 3: Initialize variables flag←1 i←2 Step 4: Read n from user. Step … Read more

Bubble Sort Algorithm

algorithm

Bubble Sort : Overview Bubble sort is considered the simplest sorting algorithm. Bubble Sort is used to sort a given set of n elements provided in form of an array with n number of elements. Bubble Sort compares all the element one by one and sort them based on their values. It is known as … Read more

an algorithm for making a cup of tea

algorithm

What is algorithm An algorithm is step by step description of the method to solve a problem. It is an effective procedure for solving a problem in a finite number of steps an algorithm to find the factorial of a number How to start writing algorithm : Step by Step solve the problem Problem Description … Read more