C++ PROGRAMS
C++ PROGRAMS
Wu a
program to Hind the trequtny
an element in an
#inudu<iostrcam.hs
#in dude < conio. h
#incd <iDmanip:h
clas ytqny
privat : int o, alioo],i, cle, 7rca,
public void input0j
void jinayquenyOj
void disployO)
void 4rcquny :: inputt)
cout ee Entur the anay5i3 )
cin>0;
cout e" Entu the aHay elemento'eendy,
7or Cieoj isn,itt)
cin> aCi;
Cout << Ente thc sarh elemet;
cin> ele
Teacher's Signature
Page No.
Date:4/611 Expt No.
void
3
void trquony ti display)
elpc
cout ee Element dos not eust';
Yoid main C)
f inputcj
t findycaunyc);
f. oisplay)
Teacher's Signature_
Output
Entr the array sIB
Entr the anray dements
22 H 35 2 2
Entor he starch demtnt
Frequeny of a is Htims
Date/b/A9 Expt No. OH Page No.
Resutant anay
05 10 15 20
Signature Teacher's 4(posn-i)
deletgnt du Yoid
posj cin>>
2")": to'positionlo
<e the Entu COutee
CIj Cin>>a
en'<e
tnal: n: Cis0, or
clemenz" the Enter
Cowt"
s13j aay th
Entr LOute
imputt del Void
displayoj void
C)delci
inputO} on VDId.
void
publii
begi miposyh,
l, clk, C100,i, an,int privatt:
del class
procss.hs udu
< #in
anip.h <iom cdudu tin
conio.
h> cudu< #ìn
<iostcam.h #1ncudu
in
programpes0Hen given
Qn
7rom clemnt andelcu to Wraiu
I| No. Page 05 No. Expt b/9Date:4/
Page No. l2
Date:y/b/|9 Expt No.
ele aCpBs];
tor Cie posy ien, it+)
al]= aCitJ
del dj
d. input ;
di deletionOj
Teacher's Signature
Outpul
Entr the
3
array oB
Enter the aray
2
clemnb
int t, j i<njt+)
hor (ie;
Teacher's Signature
Page No. Ju
Date: /b/4 Expt No.
while Cj>=)
t- alj];
aj aci-D;
aj-i] t;
void main ()
Sort 6j
Ssinput );
6. 6ortingC
$. di_plascy
gctch)s
Teacher's Signature
Outpul
kntr the
H aray siz
Kntcr the aray elenento
70 50 60 100
An
50 array
60 7o
ater 6orting
Page No. 15
Date:4/619 Expt No. D
#incude <iostream.h
#inude <conio.h
#ineude <iomanip.h>
class seanch
loc midj
brtakj
dseiCele< aCmia])
end = Mid-L;
void search !!
displayc)
i, Cloc=o)
LOut < ele <eL1s5 n position' loc 24
endli
Starchbj
Teacher's Signature
Date:4/b/9 Expt No. Page No. 1
b.inputy
b. bin-sLarch LJj
b. aisplay C)
gctchc)j
Outpu
Enter the aray size
s'3
Enter the array clement
|35 7
Enter the sear ch element
7 e2iss in positi on 3.