[go: up one dir, main page]

0% found this document useful (0 votes)
8 views10 pages

All in Algo Flowchart

The document outlines algorithms and flowcharts for various tasks, including finding the greatest among three numbers, checking if a number is prime, generating a multiplication table, and printing even numbers between 1 to 100. Each section includes a step-by-step algorithm followed by a flowchart representation. The algorithms provide clear instructions for implementing the respective tasks.

Uploaded by

aarushk704
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views10 pages

All in Algo Flowchart

The document outlines algorithms and flowcharts for various tasks, including finding the greatest among three numbers, checking if a number is prime, generating a multiplication table, and printing even numbers between 1 to 100. Each section includes a step-by-step algorithm followed by a flowchart representation. The algorithms provide clear instructions for implementing the respective tasks.

Uploaded by

aarushk704
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

WRITE AN ALGORITHM AND

FLOWCHART OF GREATEST
AMONG THREE NUMBER

ALGORITHM

1.Start

2. Read the three numbers to be compared, as A, B and


C.

3. Check if A is greater than B.

If true, then check if A is greater than C.


If true, print 'A' as the greatest number.
If false, print 'C' as the greatest number.
If false, then check if B is greater than C.
If true, print 'B' as the greatest number.
If false, print 'C' as the greatest number.
4. End
FLOWCHART
ALGORITHM AND FLOWCHART TO CHECK
A NUMBER IS PRIME OR NOT
ALGORITHM

 Step 1: Start
 Step 2: Taking initialization of N, temp=1, i=2
 Step 3: Read N from the user
 Step 4: If num<=1 // Numbers which are less than 1 are not
considered as the prime number.
Display "N is not a prime number"
Go to step 7
 Step 5: Repeat the steps until i<[(c/2)+1]
If the remainder of the number divided by j equals 0,
Set temp=0
Go to step 6
i=i+1
 Step 6: If temp==0,
Display N+" is not a prime number"
Else
Display N+" n is a prime number"
 Step 7: End
FLOWCHART
ALGORITHM AND FLOWCHART TO PRINT
MULTIPLICATION TABLE OF ANY
NUMBER

ALGORITHM
1. Start
2. Input the Number:
o Accept an input number n from the user. This number will be used
to generate its multiplication table.
3. Initialize a Loop:
o Initialize a loop with a counter variable i that will iterate from 1 to
10 (or any desired range). This loop will handle the multiplication
and printing.
4. Calculate the Product:
o Inside the loop, for each value of i, calculate the product of n and
i, i.e., result = n * i.
5. Print the Multiplication:
o For each value of i, print the multiplication in a readable format.
Example: "n * i = result", where n is the input number, i is the
current iteration, and result is the calculated product.
6. Repeat for all Iterations:
o The loop will continue iterating until i reaches 10. Each iteration
will display the next line of the multiplication table.
7. End
FLOWCHART

START

ASSIGN i=1

READ A NUMBER , NUM

YES
WHILE i = 10
REACHED

NO

PRINT NUM*i

COMPUTE i = i+1

STOP
ALGORITHM AND FLOWCHART TO PRINT
EVEN NUMBERS BETWEEN 1 TO 100

ALGORITHM
 Start
 Initialize a loop:
 Set the loop to iterate through numbers from 1 to 100.
 For i=1 ; i<=100 ; i++
 Check if the number is even:
 For each number, check if the number is divisible by 2
(i.e., number % 2 == 0).
 Print the number:
 If the number is even, print it.
 Repeat the loop for all numbers between 1 and 100.
 End
FLOWCHART

START

ASSIGN i=1

No
WHILE i <= 100

Yes
No
Check if i
%2==0

yes

PRINT even number, i


i NUM*i

COMPUTE i = i+1

STOP

You might also like