C++ writeup
C++ writeup
Al gori Phinn
Sturt
)Ddore three voncble marks 1 matks 2 , marks 3
to store
inputNan able
| ) Oeclare t o stonng
Sum
)Take the inputrom USeY Cinss
the values
|6) Caleuate he Sum and store Sum van able
Sum = mats marks2 ‘ marks3
Conpute Sum 3 :
) Diaplag the Coutk
includ<iastream.h
int maun 0
heturn
Algorithum:
1 Start
2) clave Vari aole
) b, C
tmee
to etore values
itegur
) Declore vaiablee largpst to 6tore he
value
Iargat input he USer and strc
them in variable
4he yales Condiion al opurar
Coopore ladder.
weing
else-
Ca s a>c) largat
Set
else
to Screern
|#incdude (iostreom h)
ocude <conio b
int main )
lrscr)
int
largat
loraat
else
Iagat
Sundaram
Cout P
lorgat numbe
etun
Pracieal
Aim Ctt to
qactomal nu m bey
Algavithanm
A Start
2) eclare C
Variable in t named a n
tb store he input number:
l3 Ded are vOriasle int
\an ab le
stenert &
\actonal and ini alise it ith
Tave the input Store it
oheruise tu
multgyYacton al
ndaram
FOR EDUCATIONAL USE
\otom
al
ial facko
nmbey Enter Coot«"
octril long
int
n
C; clrsr
C)main
<conio:
h> clude in
<iastream
h) Hinclo
de
Ctt Code
<nk's?"<|octori al;
Cool << " tocto a
Setun
Ainn Wrte to ueverse
number
Agonm
)Take store it
input
NCAriade
whlie hot to
while (nl )
Catroct he last digt
Hem
) Arpend to
Campotg
) Rem ove he last
he Heversed numbe
to) Return CAecuthon
tinode <iastrco m. h)
nclde Kconieh)
nt
drserl))
int
1
Cout < " Enter
Cin ny
n n /o,
funton
Algorthn
Start
last
) Rern the
main
inal
nethed
yeloe
int mainc)
) Dedare Int n
Ceut
Cout <K"
2)Petun
Code Ctt
int
GumOf Digts (int n)
int Sum
while (alo)
int |ast
Sun t laut
Sym
int maunC)
clrsurO,
iat
Heturn
Alm Write
demonstte funton orloudin
Apntim
ad d Ctot nt b)
qunction
5) Take integre parametes
3) Compute ther Sum and
prins the
Compote
nethod
) Ca odd Co ) to iot
uhich match doule
4) Return edccoin
rncde Kiostre am h
inlude < conio
ad d Ciot a ,int
Cout Su <(anb)
<< Cab);
int main C)
add loi1)
adcd (s-3 i6 ) ;
getch C);
eetun
JCATIONAL USE