pop assignment 2
pop assignment 2
AssIGNMEN T->J
statemet
HCkLaLn (aiable)i
Ecamplei
add twn
pcgtas to
#include <stdio.h>
WEUNCcILON DE LLA RATION
Pat suo (lat ant b);
fat mainc)
IEUNCTLOAN DE EINITION
Pat Aum (tat a, int b) 1EUNCTLON HBAD
WEUN TION BoDy
output
Ente dhe
Entes dhe [Ccond ounbcY :30
Total 50
Cutput
The vau um hefore calng dhe fuottion l2
Ldhe kalue called fupcthon s
h valu g numbea aptes calling ha function 12
a)aik algoritbm and examplt Jershing for convuting
chaxacdey lato lousex casea
epeed to add3ato
Mee Just
flgcaitha
Slep LiLINLTLALLZE] SE Te0
Step &i Repeat etepa ohila sIRr]|= NLL
&lep 3: TE SIR[TJ> =A' AD SIR[ T z '
SET LoLDLAh r]: STR T]+22
ELSE
Step 6 EX
foxample
t#include <stdloh)
VoLd mnalnc)
loocestor]s\o:
put (loueasb )
gulehl);
Culputi
ento dha sttng
HELlo
hello
sthing
Al¡oithroL
&tep a Repeat step 3 chile
foxample
inctude cstdio.h)
Vold ma'nl)
tat taDlengdh
chas Sh [1o0];
clasus C)
print (n nto tho sthing
Pge
geltk);
Dukput
Gntor th khing
ehing length is
caluulat Hhe
palats
Lcde
taclud <stdiia, hs
at maac)
ot macnl)
numl,numa,tolal ;
humbex ;
Aarg lthd", knum),
painf(n Enton ie second numbers)
sansl diknuma)
kum (&numl, Bnuml,Atolat)
painf(n Tolal: d tolal)
{ = Xa + x b;
Culput
Ente the
h &econd nnbe :3
Tolal5
ShucteeL and
kapw dhad malo
X
phlasephy
Thee thse methedby whech
Can be One
Janctiea to QDothtt
actual agu
-ment
enhre twcte to dhe alled
the
the called
acme lShructse vaniablo name)
takes dha
calted hnehoo. Dametnane
data ype fenttion
shuct type stname
Lxetstn leosprcsatan)
Pas ing irtauat
membuy
dala type
data type
TAlhalzation shutoeg
Some Canstoot
TOlHalzlg
to dhe DtmbNL dhe huctue
aaigalng
Syotasi
shuct shuctname
shuct student
Enteyhe aa mei
priayln
seanff"n Enty he nanae
Acanys" skudl nanaa):
snoB);
painf ("in DoB 2sstud
aukput:
nter the nam Raiiha
Entea dha Jeca i Hsaco
Entoy dhe Doe:24-O8-2oo6
Studentdetauk
Roll no2 01
lame=
-Eees 4So0o
Dag=QO8-2006
Syatasc:
Ualoo unionnGQ
3
Eaanpa
ticd <stdio. h
typealg shud foNTL
Cat
POLNI2
unlon POINTA P2
pi ( n he ca-ôrdioales PÊ ae Ld and %d
autpd
Lgctc)
atmpte
pfpdcl)
Banple
toclude <stdioh
Edeliae MAX ELLENAME-LENGTH 100
BUEFER-SIZE 10J4
Pot mnala)
lacale ta
Jelese ltapusEia)
enumGation-nan
enun
CoLORSSRED, BLUE, BLnCk, GRELN, YELDw,
PURDLE
Bxamplc
tCnclude <stdio. h>
tad mato)
cutpul:
BLWE =3
BLACk=5
qREEN 7
VELLOL) =3
pURPL E =
LOHITE 1S
c)Examnpk:
Ente foputEle AanmInpc
Erées tasqedEleAlarm tacgcdc