To penta) orttthmetic opeMotions by pass by-volue
To eotte oc program to reARSin all the
anithmeric oeietions by using pas by volue-
Algor then f-
seep A Stee
step2 i Read asb
eruttipticaston and
mer3 7 FS addton , subtviaction »
pMsian oF agb
Seppe surn= ath
sub = a-%
Mol a%b
bye ale
Step 4 8- Print fre Values oF Sun, subsmut, AV:
seep 5 t~ stor
soutce codes
HH Trelude < stdio-h?
Int add Orta ,meb)>
ant subtract cinta smth);
qnt muttiply Cinta /Wtb17
nt divide cinta yrnth?}
Tat main 0)
{
wnt ah, GUM, digieence , produce , diiseny
printer CT ented O Gb veluess!)7
Sant ("xd nA", 80265;
Sum 2 adol Canb)5
Oleferences sub+Iack Ca, 4) |
|tL
lager
prt EIPIY
oe adel 5
add = ab?
een (adds
fe sutoaee _
{
jnt cubtnact 7
suprnact «ab?
ere CADRE?
3
mnt multe cnt sine
t
ane maltirty 7
mulfirty 70487
retin (oreati)7
J
foe aivide cinta, tot?
{
int divide
divide *Of57
yetuan cavide?;
con F
pide @*>
tien OF
intexpected Input 2
ented ab vouwes s 4 2
expected cubpurs-
Sum =e
pifferience= 2
Poduct-= & ea ee
pivision = 2.
Actua) ‘Input 2
Enter ab values: 4 2
Actual outpet 2- oh:
sums 6
Difference =2
Product-= § mens
Division =2.
Result ¢ . pease
Hence, the ¢ progam 16" parcaim arithmetic 5
Ope ustng functions me success Rilly execerteo!.
&)To Find FactSiioD of a number using vecursingn,
Ams
Jo wiite and develop a cpogram to Find the
facial of given Tambes ucteg ye cus on
plepithens=
seep 4 27 Stone
step-a % Read facta? mum
fdentieien
seer73 %- Specify the spectad operate! 6?
Nee factstiod.
srep-4 COMpute FactdaD = Fact cnn)
step-5 = compute n= 1% Factcn-)
step-6 c- Display He vest
step-1 stop”
Souce code f-
include «stdioh>
mt fact (mim;
fnt maint 7
tee Facteted num?
prince center te value Cinema
scant ("4")
Gi
num) 7
facteiad = Fact (nur 7
prnte (Hl ractiad oF 74 is Td
return 05
{\n" num , Facteials
5
yt Fact Cink)
{
te (n=)
vetumn 15
else
nw Fact On-197
wretwan 17enpected THR
enrected oubrpets-
pactatiod OF S'S
Actuad inpatt
Actuod oot Pod 2~
Result 3-
4
enter the Value of mum=5
leo
mien the Value of mum= 5
Facteial of S 78 120
Hence, the c-pogam to calculate th
of given ramber Succe till
fp
ec factaiat
ig” executed
eget ats
aJo Generate Plhunacel sevies using vecurslan
the
Aime
to design and develop a c-Proqram to are
Fibonacci series using recursion
Algor
step- 4 Stacie
step-2 + ReadneS
seepg ge FECTS, TEN 5 149), Print the pwn acd
series
skep-42- TR Cneeo
Fibonacel (n-1) + Pibenacet cne2?
else TF (n==10
Hiboracdd (n-1) 4 Fibeacct cn-2?
stepS 2% stop
souee, code 3-
HHirclude < stdio-h7
tnt Fibsnacei (Mt 7
ant main?
t
Int 1267
mei;
printe ("Fibonacci of valyn)7
rar Ci =05 1297 14 F)
iG
prince cid, Riberace’ C05
TetLOIN O 5
Tmt Filbsnaces Cnt)
fe cns=0)
Lyetreamo;
JExpected Ouspet 3
a6 55
295 6 13 7!
Flenach somes — oO |!
g4
Actuol tops
Enten a reumbedt = 190 (2
aActiol oothat &
pinonaced verter — 2 i peaeo 5 2 12 21 965
al
Result
Hence, the PoOTom
Ws successfull
to find Aibsracd senies using
tg executes.
~