0% found this document useful (0 votes)
21 views9 pages

Flowchart

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

Flowchart

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

FIBONACCI SERIES FLOWCHART

START

Read n

F1=0,F2=1,F3,i=1

print F1 F2

True
False
while
i<n
do
F3=F1+F2

Stop

print F3

F1=F2
F2=F3
i = i +1
LEAP YEAR FLOWCHART

Start

Input year

False if True
year%400== 0
?

False if True
year%100==0 Print Leap year
?

Print Non-Leap year


False if True
year%4==0
?

Print Non-Leap year Print Leap year

Stop
PALINDROME NUMBER FLOWCHART

Start

Input n

dig
rev=0
copy=n

False while True


n>0
?

dig=n%10
rev=rev*10+dig
False if True n=n/10
copy==rev
then

print Palindrome
print Non-Palindrome number
number

Stop
DECIMAL TO BINARY FLOWCHART

Start

Initialize dec,bin,i=1

Input dec

False while True


dec>0
?

print bin
bin=bin + (dec%2)*i
dec = dec/2
i=i*10

Stop
LARGEST AND SMALLEST AMONG N NUMBERS FLOWCHART

Start

Initialize
n,max,min,num[100]

Input n

for
i=0 to i<n
False ? True

Input num[i]
i = i+1

max=num[0]
min=num[0]
i=0

False while
True
i<n
?

if
True num[i]>max
print max & min if ?
num[i]<min
? True

True max = num[i]

min = num[i]
Stop

i = i+1
NEAREST PRIME NUMBER FLOWCHART

Start

Input n

False if True
n==prime
?

lower=n-1 print n
upper=n+1

if False if True
True upper==prime lower==prime
? ?

print lower
print upper
lower=lower-1
upper=upper+1

Stop
Sin(x) SERIES FLOWCHART

Start

Initialize
x,n,i,j,sum=0

Input n

Input x

for
False i=0,j=1 True
to
i<n

fact = factorial of j
sum = sum + ((-1)^i)*(x^j)/fact
print sum

i = i+1
j= j+2

Stop
GOLDBERG CONJECTURE FLOWCHART

Start

Input n

False for True


i=2 to i<n

False if True
i==prime
?

i = i+1

False if True
n-i == prime
?

Print Number can not be Print Number can be


expressed as sum of expressed as sum of
two prime number two prime number

Stop
ARMSTONG NUMBER FLOWCHART

Start

Initialize
s,copy,dig,count

Input n

count=0
s=0
copy=n

False while True


n>0
?

n=copy

n=n/10
count = count +1
False while True
n>0
?

False if
copy==s True
? dig = n%10
s = s + (dig^count)
n = n/10

print
Armstrong
print number
Not-Armstyrong
number

Stop

You might also like