Professional Documents
Culture Documents
Date. -Page
Steptheader l
tep2MainuncHon
tp3: Declare a lolio,Touw,tolijbtaleo ,
Stpl nter the oumber m 2 et He ualoeAstmm
or Coj4col;jrt)
L9cant CLo 4a ljij)
3
ep Check houo mans roe3 ase there in gien.
mai
totoltt;
1
P
SURYAGold
Dato
Pago.
SUR YAGold
Date Page
j*Djktel t+)5
hanspeseI|Ii]= alilil1 kotal no 3eroes Li 5
t a Spáss mmri1
mt The manspest atere mai io apar
mnrN ii AdL DO 2
reprenaim
3
02
qetchi
Ourpu.
Enter the ro o TOuos E Lotuung
3
3
nter the mami emuts
2
3
SURYAGold
Date Page
Stepl Header il
pa ZE klsid maln
Sp3 Detlare ama a n value ,i
3p Prnt àenter the 00. elements in the arroy
Usinq Lan:
ep5 prnthenter the lis q clements n the array
Bph Usina locp get hi BE Vau tm ammy
Ekp Detne 2 delau he unutim
wctt fhe insectim 8urk pmudure
Btp 8 Dettre Delm1 & Dettare oa kunthm
to
mnt The' Booted amoy_
icludi (8tdo.hy
nlud lonto-.n>
otd ingert CtnE ber[] t n)
EArr CL)
whijo 4d arrtj)> ky
larr Ci+l = arr Ljl,
brclitL>kyj
SURYAGold
Dato
Paga. SUR YAGold
Date Pago.
tntn)
Votol àrray Cint drrt
Output
Enterthe no. ekmanrs oo th nmays
ror iiAtatin hi Secka amy isIn ").
Ci-o;i i4tt) Enter he elumuts
3
int man)_ n may_ elunAts are
3 4 5 2
CurScr
InF_ DTl30),n, L i /3 4 5
crine"Enttr he nD elements th oma
Qant( 1d " n )
r i n t tnter h
elumetns n)}
i=n i<n Jtt)
8ton | . d darrrr):
3
printtChe 1O.ra elmants are lo ")_
Step Heasler tL
Ste p 2 int maun
SHep 3 Detlare omayn(Gramaygt tennp = artil
sp 4 her &13e nrmy mm he user arr i
theOnrayelemeots onm fhe r arrl= temp
Usina r loap
Step Deineand declare he uncim
auck Sact usina recusim
tmp orLil,
prqcam orcLe arr Iplvot1_
larrlput-tmp
nuude (3tdio h uick smt(nrr,
laoi)j
tntude {lomtohny uitk8tt CarritLhub)
ud qutksartECtat arrtl tn ouo,
nt hiah
mE pvot,jajtmpi
Couthio lcrSer)_
OT arr (S0),tD
ptvotlouo in touo 00nu eLimints do ya uannNa goTE
4
2
n jt+)
or k=_j- =Dke k=L
Carr Tti2 = ar[k)
Impmetng quickhTo nkd ist i brtak
2 5 else
lemp=arr lkjL
a r k j a r tk+il
acrltil: femp "
SURYAGold
Dato
Paga SURYAGOld
0ate _Page
Speore 4qet the
PESkp5 pilina3Tkd elumna IntmoinO
in
Clarser( ;
Skps btloK 4
Qet thi kn
no.
eiuminAom w
Qet hu arrau' elumtnD UMu
Stan ."an)
k=D k<nkt+)
l t t ( lnfateth 7, d elumintR n 2n )}
Hr lk= 0 kn kt+)
incudi {8lio.h
tntud KLonip.h Sant D, d darr Tkh)
Void hella7rt( int
3
arr[, nt n)_ helleort(am , n
ink i , tmp
eint"C"In Thntted arrau i h'
(t=D5 n Kt+)_
or=nl2 i0 i=il2')
print+CAladlh", drr[k)
yoTtd arrau ls
2 3
SURY
Data
Pagn SUR YAGold
Date -Page_
5 r i l oa moqm to omonklaal tp
NCLud <Stdo.h
S 2Sown 1nCudu Conto.h
T Tep
O Destratim, kotd ToH (tnt N Char CharDChauT
anniim
SDeilau tt a' Chax S, D,T
nl th Number doks ie (N valu
5allJunhm intt C"ThL disk d moue pum , c %C
1
TDH Cn S',D'T
NASD
3
Jo0QaM, el tn>)
DepnAnd diulart wnchD
/on TOH+ (Int Nthau 3 ChbrD,thauT)_ TOt N-1 S TD)
TDL NLT D, S)
use
|InE maln
Ouput
ntth th 60 diks 9 . Prararn
dak MA om 8 to T M die
nMDA kom m D t tnclude (3tdto.hy
h dukLMDuiS om Tto D tnuaudu Kwno.h
0ckermoamCtot , tnb b)
push)%_
6 bse Suithase
Eeak
4De a hA untho
Pop pu s dtpla E Pops
break
Proaro lapt 3
dusplay
tnthud (Stdto-h> break
incudi {conto-hy
uds edub:h eutto)
# dekni MaxS diault
op -
xet yd puyht)
yotdXotd popt)j yd pbh ()
Veiok dsplays
Vod ma'nl) i top MAX-1)
StikGol
Dale
Paye
SUP YA ald
0ata
tnt i
1 CrpEEH)
pr'ntt C" In gta ckb emph" )
SUR YAGold
Eneretac -Evalunhm pesth Date Page
Cs dutt(xe)
thar eap [2o)}
Char e
2s2eic pugh Cnum)) rine"Entr îhe epresiim "2
Sant ,3 ",ep)
elee
eenp
htle Ce \0')
(Suuitth Case {or
Ci9diqlt (*e))-
push n3
SURYAGold 234
Date Page. 2 SURYAGold
PgU
ett B6
pushCoUm)}_
printt (o h gesuut Hth pattiz tualatom3
S .do"ep Pop)
elge. PoD
erch
toeun DD
De
Suitth L *e)_
. butpur
Cage
Enter thu RPxICRLm 3 ut
ne egult o theEat eualuabm 93YfL=4
brak-
3
13 na2-ntj
brea
3
tase/'
break
Push Cn3)
SURYAGold
Dato SUR YAGold
Pago
/ Date Page.
ht ij
}ap ttAront t=-llfront> rear
Developa propram er gUEUE tnat perrm priart("Sunu un loulnl
oloxoltun pimlhuL OpermN tnset, delute elbe
displa.
Or Ci= 1ont tk=Tear_it+)
ithn
3
ader Jalus Detina oni So-
Deciar'ununnpaz nsectdelte dsplau 5.main unthm
3 Declau int q Cma1 iOE YDA==, 5aont=1 wMh8uü tth: ta umplimet thi Cpenahm
U Vaid isert (O
Poam
CTar -mon-LD
rintt (" Sueu cuuatou")i inuude <3dio-h
Use
loéude iStdlltb.h
RAon -0 too <miur.
deun man SO:
tgear tti vStdiosert C)
uod delui Oi
Qerelements tromthe User vad dtspla)
void elute )
ioe MAX1;
a t renr
ICAront
as | |fwnt >rea nttoat=iL
printt C" Buuaundnan In")i
Void insert O
Delut elemun 1*rearE= MAX=I)
roo+ pmart C" Quuaus un Du"
3 e .
vnel displ)
Backspace Num
SURYAGold
Dato SUR YAGold
Date Page
i on
ont 0, Cdans C
Ycar t t .
oratt (Ente the elementln")}
Scant C .d",dqlrear) prinrt"enn thu ophm :n 1, ngert n 2. tiuti n
3
dplayln
3
rinten Lhatc:"
vnid del0 Stant/,d ", c h )
Susih lcCa)
+Cntze-tllAront Tear)
prin"8uc under Houn)i e L inserÜ break iL
Plse
Coe2 duli) break
CAAe3 dbpai brgak
printt C Deleted elumest b d n" delaul prtnttl'n thm o mr In
tronttt eylront priattC Doyaw uant fo comhinuth J
Qetch C)
3 uwhil Cc== ' y i
qetth(
vtd dsplay()
mi
OutpuT
n the Dphm
rn
Dinsect
(8uu undn ouol»)13
diopkay
nta thiu L
r Ci trntyic=rear; i++)_
Enin th unat2
Doqou uant T Lonhnu#
3 Ser tha ophm é
3
Yod matn()
Arscr(D
Datn
URYAGol
Phgo. SUR YAGold
/ Date Page
toud Conio:h
tdilinn ma a0
vio indert , - Vao dist)
'elpse
vad toert(
Ctount/== ma12
grot("quu OUnHou In"))
prtatt (nJ,d" qlE))_
k= (kt) '% maz
Date. Pago SURYAGold
Dato Paga.
Nnd maln)
uhill() 2nin chste:
nln fhu elumus to U3ent
prnt qut u munu ln)
rntt C" nt ngert na.diute n3: disRlau
inu.ealt In" L0 2 0 30
printt nEnter _tnntu n") L
StantC 9. " dth)
Gut thcn)
breati
CaA. 2 ouuu:(
oreak
rea
break
dialtipunttl uorDn chninlo")
Dutpu
Qu MAA
L Inser
. diu
eaE
notaHmn
play
taorithm
ader ile
2.Decare unctim Pus* POP Piri
3Deine theseucim
Void push Cchor
8tack L+ + top)
3
tappP
CheckfE) empr
Use
Stacgtop--)
10t sorimi-
t(a=-+|| 2z-)
Teturn
Tcturn 2,-
elseCa=A)
relum3,
3
Main tuntHm
COMPASS
COMRASS
JE it C ns opend tManO
push oast thz
3 Clrser
Char p lI001
roomm char e
priattCEnter tha preim"
stirdvde (sdioh econt Cn .3" ep)
ntuad tspe.h> prinre n"2_
t h d conohy
cha Stouk l00)
int op =-L_ shi *e =_ l0')