Anda di halaman 1dari 22

Area and Circumference of the Circle.

Flowchart:

Celsius to Fahrenheit Conversion.


Flowchart:

Swapping of Two Numbers Without Using Third Variable.


Flowchart

Leap Year or Not.


Flowchart

Odd or Even.
Flowchart:

Electricity Bill Preparation


Flowchart:
START

Get Values of units

Calculate the charge


according to the units
consumed
Display the
charge

STOP
Biggest of Three Numbers.
Flowchart:

Roots of Quadratic Equation.


Flowchart:
START
Get Values of A,B,C
Ans=B2-4AC

If
Ans=0
YES

NO

Real , Equal
YES

If Ans<0

Real , Unequal

NO
Imaginary

R1=-B+B2-4AC
R2= B+B2-4AC
PRINT R1, R2
STOP

Armstrong Number
Flow Chart:

Start

Get n

a=n

No
while
(a>0)
Yes
r=n%10
s = s + (r * r * r)
a=a/10

If(s==
n)

No
Print
Armstrong
Number

Yes
Print
Armstrong
Number

Stop

Reverse A Number
Flow Chart:
Start

Get a number n and


Initialize s=0

No
while (n>0)

Yes
b=n%10
s=(s*10)+b
n=n/10

Display the reversed value


s

Stop

Palindrome Number Or Not


Flow Chart:
Start

Get a number

copy=num

No
while
(num>0)
Yes
rem=num%10
sum=(sum*10)+rem
num=num/10

if(copy==su
m)

Print Not A
Palindrome

Print Palindrome

Stop

Fibonnaci Series
Flow chart:
Start

Get the limit from the


user

a=-1. b=1, i=1, c

while
(i<=n)
Yes
c=a+b

Print c

a=b, b=c, i++

Stop

No

Prime or Not
Flowchart:

Factorial of a given number.


Flowchart:

Simple Calculator
Flowchart:

Swapping using call by value


Flowchart:
start

Swap(a,b)

Initialize x=10,y=20

Print x,y

Call
swap(x,y)

Print x,y

stop

t=a
a=b
b=t

Print a,b

Swapping using call by reference


Flowchart:

start

Initialize x=10,y=20

Swap(*a,*b
)

t=*a
*a=*b
*b=t

Print x,y

Call
swap(&x,&y)

Print x,y

stop

Print a,b

Recursive function
Flowchart:

start

fact(a)

Read n
if(a=
=0)
f= fact(n)
return 1
Print f

stop

return(a*fact(n-1))

Performing arithmetic operations using functions


Flowchart:

Displaying student details using structures


Flowchart:

Displaying employee details using structures


Flowchart:

Find string length without using library function


Flow chart:

start
Read a

Assign
Count=0,
i=o

a[i]!
=\0

Count ++

stop

i++

Find string length with using library function


Flow chart:
Start

Read a

Compute strlen(a)

Print the length of the


string

Stop

Find reverse of a string without using library function


Flow chart:
Start

Initialize temp
i,j=0

Read str

Compute j=strlen(str)-1

If i<j
true
temp=str[i]
str[i]=str[j]
str[j]=temp

i++
j--

Print the Reversed


String

Stop

False

Find string Palindrome using library function


Flow chart:
Start

Read string a,b

strcpy(b,a)

strrev(a)

String is
Palindrome

True

If(strcm
p(a,b)=
=0)

False

stop
Find string copy using library function
Flow chart:
start

Read a,b

Strcpy(b,a)

Print the copied string

stop

String is not
palindrome

Matrix Addition
Flowchart
start

Read rows and column of


matrix as m,n

Read c,d
first[10][10],second[10]
[10],sum[10][10]

For(c=0;c<m;c++

for(d=0;d<n;d++)

Sum[c][d]=first[c][d]+second[c][d]

Display sum[c][d]

Stop
1111

Matrix Multiplication
Flowchart
start

Read
m,n,p,q,c,d,k,sum=0

Read first[10][10],second[10]
[10]

False

If
n!
=p

Matrix not
Possible
True

for(c=0;c<m;c++)

for(d=0;d<q;d++)

for(k=0;k<p;k++)

Sum=sum+first[c][k]*second[k]
[d]
Multiply[c][d]=sum

Display multiply[c][d]

stop

Anda mungkin juga menyukai