0% found this document useful (0 votes)
5K views

Flowchart Prime Num

The document provides flowcharts to determine if a number is prime, generate number series, and identify if a number is even or odd. The prime number flowchart checks if a number is divisible by any number between 2 and itself. The number series flowcharts print repeating digits based on the value of two variables. The even/odd flowchart uses the modulo operation to check if a number is evenly divisible by 2.

Uploaded by

Mohit Kapoor
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5K views

Flowchart Prime Num

The document provides flowcharts to determine if a number is prime, generate number series, and identify if a number is even or odd. The prime number flowchart checks if a number is divisible by any number between 2 and itself. The number series flowcharts print repeating digits based on the value of two variables. The even/odd flowchart uses the modulo operation to check if a number is evenly divisible by 2.

Uploaded by

Mohit Kapoor
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Draw a flowchart to find whether an entered number is prime or not.

Start

Read n, i=2

Yes

If n = 1 or n = 2 No If i < n

Print Prime number STOP

No i=i +1 No Yes If n % i = 0 Yes Print non prime

Flowchart for series: 1 12 123 1234 12345

Start

Read A, B

A=1

B=1

No

A<= 5

Stop

YES NO B<=A A=A+1

YES Print B

B=B+1

Flowchart for series: 1 22 333 4444 55555

Start

Read A, B

A=1

B=1

No

A<= 5

Stop

YES NO B<=A A=A+1

YES Print A

B=B+1

Flowchart to find whether an entered number is even or odd

START

Read N

If N mod 2 = 0 No YES Print EVEN Number

Print ODD Number

STOP

You might also like