Write a shell script to check whether a given number is prime or not
Source Code
Problem Statement: Write a shell script to print Fibonacci series Algorithm: Here we are giving only the upper limit of the wanted Fibonacci series, by the program default the lower limit is zero. INPUT: n [upper limit] OUTPUT: Fibonacci series [up to n] Step 01: StartStep 02: read nStep 03: a ß 0Step 04: …
Shell script to print Fibonacci series with Algorithm Read More »
Problem Statement Write a shell script to check a number palindrome or not Algorithm Step 1 : Start Step 2 : Display “Enter a Number” Step 3 : read n Step 4 : temp ← n Step 5 : Repeat step 6 to 9 While temp> 0 Step 6 : ans ← ans*10 Step 7 …
Problem Statement Write a shell script to find the largest number among three numbers Algorithm Step 1 : Start Step 2 : Display “Enter 3 Numbers” Step 3 : read a Step 4 : read b Step 5 : read c Step 6 : if a>b and a>c display a is the largest Number Step …
Shell Script to find greatest of Three numbers : SOLVED with ALGORITHM Read More »
We will discuss here how to find the sum of first n natural numbers. Sum=S = 1 + 2 + 3 + 4 + 5 + ……………….. + n ❖ Algorithm Step 1 : Start Step 2 : Display “Enter the number of N” Step 3 : read n Step 4 : sum ← 0 …