0% found this document useful (0 votes)
7 views24 pages

Pop Record

The document outlines various algorithms and flowcharts for different programming tasks, including reading input, performing calculations, and displaying results. It covers topics such as bubble sort, matrix multiplication, and string manipulation. Each algorithm is broken down into steps with corresponding flowcharts to illustrate the process.
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)
7 views24 pages

Pop Record

The document outlines various algorithms and flowcharts for different programming tasks, including reading input, performing calculations, and displaying results. It covers topics such as bubble sort, matrix multiplication, and string manipulation. Each algorithm is broken down into steps with corresponding flowcharts to illustrate the process.
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/ 24

Slgoi thm:

Stepi Stat
Step a Read num I hum a
Step 3 : Read oprate
Step 4 : Evaluate opeeateh with susitch stotemeit
Step4l! Cosel+';, pesut
90 fo step6
Step 4.;Case-!Usutt- num 1 numI
go tostep 6
Stept.3 case l*esut numn 1 *num
go to step6
Step 4.4 case l/ tgásult num 1i /hum
go ta 6tep 6
Step 4. 8 lase ly,esult nom1%n
go to step6
Step 5: in valid operakon is entercd puint
Sn val'd opto"
Step 6; paint Ubut

Step ?: &top
Flouschot
Staut
Read um (4num
Read oprate
Switch (ch))
Çase't Izue Obtnum| +num

False

'osee sthom-numa
False

Case Troe, bult nomt num 2


False

<casc
Tzuek Tsue
nurigpant"nyali
'opehaten
Falbe False
dellt num 1/numa
KCashue
false k
<noraoS/Pint " nual
opevation'
id
Psint Sn ualid/ Falye
Opesationesoft zhum1yorum al

Stop Print swsultk


Algosithm
S tpat 1 :Stast
Step a Read non -zeHO 'Coeicients a, b, e
Caleu late dissiminathgtjdeb4ac
Step3
Step 44' 'Check is 0ots a e real and egal
X15-b/(aa)
b/(afa):
paint t Roots e eal ond eMal!!
point X1, x•.
Gho to 8tept
Step g: Check tt Boots, ae eal and distinct
|2-b+ Sqst(a) D/Caka)
2a(-b-Syst (d))/cata)
Point Roots aa tea!
al and distinct!
psint X)Xa
Step 6 Check if yootsava imagiany
point Ii soots ae compkr"
point Root |7 txa:
t1
print Root

Stept?Stop
Flouschati
(Stast

Snpot a,bc/

wsnpt new valas


False

Tsue Pxint Roots ae Tea/


and eauo

False Psint Rooti/


oota

Fole and dtinc+ "/

psint hRoo tsor odt 1=-bt Sgat(d))at)


inagi ray" oot az(-b- $yat(onata)
(Dlata
/paint 3001/ s0ot a
300t 1 -blaka
Syoti;absd)>/(ata)
Pant"Root l= 3A +i%.3h YOÝt 4,N00t
"Root a = h3 ~i 3 ", toot l, oota

Stop
thm
Algoi
Step1 stat
Step &: Read name &unit
Step 3;ik unit 9o0
Chage 0.8* unit tloo
elbe it onit <=300
Change =(unit 900)*o.9+ 960;
else ik unit300
Chage = (unit-300)*1+350;
ik Chage >=400
chage *=|15
Step4 : Displayéhaxges
Step 5 i Stop
Flows chat

Stat
Read name 4onits
Tul
False
nits<a 00
att *Unit o.2 Tsue False

amt+z(onit-00)o.9H60
Kunit 300 Fale

amtt-(onit-300)raso

Tue amt
amtk-|.15 7400

False

ointname andamt/
Stop
Fowchaut

Staxt

Enter thu number souws

Display blank apaces


1

ho

Yes
Display nombens in ascending
Loxdes pto midd le
No

Display numbei in. aewsse


Yes osdes ateh midd le 3

pint the Aeutt


Display
(Stop
Alogithon
nlgoithm bobble..sost
Step 1 : Stast
Step & Readn
Step 3 Repeot so ico ton-l
Read ali]
StepH ead kay
Step 5 Tnítaize low 0 highen-1
Stepé : Repeat thuough siep6 tielow cehih)
mid =(owr high)/a
is (key=a[mid )
foun d=4
ese if (Key >a [mid)
low = mid +1
clse
hig h mid-1
end while

Step + : it (7ound -=1)


psint Ttem þoun d"
elbe
poiotItem not Kound}
st ep&: Stop
Flow chat (Stact
head n /
j=0;i<n; i++
ead keyeleneat

ead Rey

low O
high 1=n-I

lowchigh
Falbe L Tsue
mid = (lo wthigh)/a

Keyo Falseyalm False


Tve Fsue
kound= Low= mid+| Thighmid-t

Taue
<bound 1 Folse

Item bound Ttem hot sou

Stop
Algosithm
Bubble sot
Step 1i- [Stat of tha algos1thra
Stat
Sfepa:- ead n
Step3- Repeat ieo to n-t
xead aLi]
Step4 Repeat ieo to n-1
print aLi]
Step 51 Repeat though step 5 oh ie1 ton-i
Repeat le j o ton-?
tem pe ali]
ali<aLj+]
aLj+1]< termp
Step6 Repent i o ton-i
píhf ai]
Step 7 Ettop
facchat;
(Stast

Read n

iz0,ien3 itt False

T8ue
head ai]7
Fal
i=o, icn;í++
Tsue.
False
Xi-ojn-j-1j tt

temp=aT
|aliJat)

Stop
ALGORT THM
Step stat
Step3 Read m, n
Sfep Bi Reod P
Step 4 ifn<=p)
Print"mati'x. multiplicotion not possibl
go to step l|
Step5- Repeat thuough step 5 jo ieotom-4
Repeat ojeo to n-1
Read biÏt;]
Step 6: Repeat ifough step 6fon jéo to-L
Repeat gos jeo to pt 91
Repeat jos iEOto-1
Read b EJCjI
Step 7 Repeat though step ? fos ieo fop-1
Repat o jeo toqy-1
Psint óLiJC
Step &! Repeat thuaugh step &jen jko to p
Repeat os to'gt
Psint biL
Step9 Repeot th 800gh step9 f ieo to m-1
Repeat so jeoto 4-1
Repeat k Reo to n -
Fow ohat"
Staxt

Tsue /Pint"mafix mulhipl


s not pOsbible!!
aton

Anput elenert&
Lok matoix A&B
/Psint matix N&B
False
heioto m PaintroazcSop
T8ue False
Senj0to 9-1
Tisve,
Icpirlao
jon K-o ton-1
False
Toue
CCJCJ+ = ADIIK*B[KICN
Rlgosithm
Step1 Stat
Stepai Read x
Step 3 : Initialize the vasuables

xEX* (3.14a/RO.)
Step 4 Read n
Step &: temej
Sinze tens
Step 6 : dene J*N(Kn+1)
teume-tnkx*x /dens
Sum = Sum +tens
Step7: Psint the ehtt
fum wsing libxauy functon = in Cx)
Step8: stop
F o w c h u t

Stat

Read degrer

hum eG
bactei

Tewm nume/acd
numee- humet I
tact< fact tij*(i+f)
Syme, 60m ttem

Tsue tem:

Pint calculated False Sihe


vale& Predeined since

Sto p
Algosithr
Step 1 : stasct
Step à : Aead n
Step 3: ead fes (0 ton-f
Reada [i]
Step4 pot =a
Step 5 : sepeat e izo to n-t
&um ¿um t* prt
pot ++
Step 6: mean Sum/n
Step pt=a
Step &. epeat ko ieoton-1
&unst d = sumtd t pow C* pts-mean),a)
p s +t
Step 4 i std = sxt (std sum/n)
Step to psint mean 8un and 8tandad deviation
Step 11 Stop
Flowchaut
Stat
Read n . /
Folse
T8Ue
ead ar7

Pst=a
Fals e
i20)iehi i++
Tu e
Sum =Sum + *pt
pts t t

mean Sum/n
Pxta

False
TUe
Sumstd> &om std+powLpts-meon)a
Dty+t

Std =84/3t (sumbtd/a)

Psint mean, &vm¢S

btop
Plgosithm
Step1 i Stat
Step : leac stng si <s a
Step 3: length -sts lergth
Step 4i Dispay lergth land lurth
Step5 : (compar-stslgs (st,sa)-o)
point ' caua stsings
else
pointornegual stuings
Step6 : call mcton concaterati
' Ceoncatenat e(sL, s))
Step? print con caterate sting!
Step&: stop
Al gosithm sts ing iergth ()
Stepti stot
Stepa: spate stepa thiough while (s1 DJ!='\o)
itt A

end while
Step 3 Stop
Algosithm stsing -compap()
Step 1 : Stat
Step a i kepeats spa tsough while (6 C73- saLiI
boeak
end while
Step3 i7 (sti]-= 'o'& & sai]'\0)

else
Setwn 1
Stepti stop
Nlgosithm Stsing-con catenate C)
Step1 ; Stasct
Step : Ihitibzeieo
Step 3: Aopeate step 3 thOUgh ushile Cs1iJ= to)
end while
Step H : initali zej=O
LiJe
Step 5: Aepeate steps thou gh othle (sa
+t

Cnd while
Step 6: S [iJ=l|o!
Step ?i Stop
Eowclat Stast

Char UbnISOI;
cha nome[507;
int gaks
-i,n
iau
Sing length Comp kting
Stast Stat
inti=OL
uhite (s[iJ=sa
while (sN

Aotn/
end
Hitt
Con catenate
Stat
linti,ji20]
While (siû
atun o
Aotun

itt

while (s a

s [is L
Algoaithg
Step L Stast
Stepa: Ceate the stucte student with Helols
and mashs and stsuctu vaiab tes sLio7
Step3 Initialize tha. vaiab les Countav 0, coutblsn
Step4i sead thu number of students (n'
Step 5: Aead tho vale of usN nams & mauhs
n numbe ot stodents usiag stsuctw
Uasiable sLi sor j=0 ton-1
Step 6 i Display the details
Stept:Aepeot A i 20 to n
Compute thu sum studenty
Steps : Compute the averagl
Step9: epeat sr i 0 to n

point'tota num bes of sto derts sbou, aueage


le
psinttotal numbes of students below auoag
Stepo Stop
F l o w c h a t :
Stat
Chaisns0J5
khas namel50;
int marS
int n
CountaV =0
Countbu= o

False
Xiz0; iens i++
TUe
7Aead SLiJ-Usn
Jead S], name
Head si]. mar

Pointz ("Displaying ingo!"


Xio;in;itt
ZPsintk wsn,nam, maats
KiEO; i<n;itt

Sum =som+ S[i2ema


laug =sum /nl
Point7'Rug mahts'aug)
i:0; initt
SL7nass

COunt bV+f

contav

Stop
Algoithy
Stepi stat
Step : Aaad *ptst , *ptsa.
Step3: Input sounce le rame ramel ond pyiot
Stepti check i% kpts 1=NOLL ? Tf yes Psint
doesn't tound os EAOS in opening it no
Lnput newle name name and paiat
&pts 1
Step E: chech i ty a= Nu?fes Psint ile
doesn t joond os EOr in peningi t e
no psint tclose tptr 1) close ChPt)
getchan)

Step 6 : while exit pant chfgetc C}prol)


Step?: check i} ch -EoF It ye paint fctose Cpty4)
tclose (,pir) get charc) else point
b putc(ch,7 pte)
Step &: paint sucslts
Step4: stop
Flowchaut
Stat)
selectkpto4, ptso/
pputs0UÝce ple name frame 4and
pint pts1
|
Yes
WULL
NO
Psint ple docse't foond on
e rame fnomea
new lBoint
Tnptand kp1

(exit)
T66ptra Yes
NO WLL?

o
Pintle dosen'+ found
Eo` n opening
<uhi'le
Yes exita
Chtgetc tpts4)

Cchfph)
klos e(pto1) ChEOE NO Lputo
jlose(ipt)
2et chanc)

Stop

You might also like