0 ratings0% found this document useful (0 votes) 34 views14 pagesPrograms On Conditional Control Statements
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
ar PFOdiam = +o rv
Find ao number 1S ewen or odd
pies ‘To design ana
whethy Che gi develop a c- program to ¢ind
ner oe eee
or odd number pump ey
pigothm :
stepl: Start
steP2! peqare’n”
geeps: Reaa'n!
chece for
4h condition v2
geht *
eters: FE Steps is tur tn go FO step 6 else
go to steP 7
eens | DISPlay “phe number IS enn’
stePT pisplay "The number s odd
grer3 sreP
soul ce code:
se includ ezStdio-h 7
ine main)
t ink &) .
ius of 0')4
prints Center tha vi
seant Cy a’, 2”)
if nen =O)
print + (“entered umber is evendo")y
est :
printt (“ements number ¢S aan’);
reauin 05 /-
Expected in
Ente the vols of nit?
Expected out Put
n ts even
Enter th volt of
Scanned with CamScanneryo [esto . number ise
/print numb vs oda/ ae
‘Scanned with CamScanneractual mpur:
Entey tht volut of p99
pctual ourpur®
Enterta number is even
gesure!
pen@ th c- progam to test woeter the emiered
aummber euin of odd is sucessfully desigud
me Acured for differms valuts
Scanned with CamScannerSS eS mbes
{
o Maximum — of three numbers
ana develoP a c-Pmoyram tO find 4h
|
fim! ‘To desigo
the gnree given numbes, |
porgest. var oUF of
pigonth™ |
gree 11 Store
step 2° peciare the variants ayb,c , mar
gee 5 pead a,b,6
gter* Diy tht condition Max=
gtee Ss * te p2a goto skep-6 else go to SHP 7
gre Ph rif gteps is tur , mat =b
ghee sTE cpa go +0 syeo-8 erst go +0 SKP
gteP :TE c7a is Hw, maree
eter 1 REINE mar
gouRc& col E
=
+ inaudezstao bh?
ine main?
|
| {int a,b, , MOX)
|
|
printf ("ener val
mor =
uf
mart =P >
vecezmay)
mat =o) ni
pane C main 27-4 moar)
rerun 05
Scanned with CamScannera
Deaare abit, max
[Read a,biC
‘Scanned with CamScanner| ow
expected inpur
Ener vals of a,b6 5 3 92 44
Expected output
maximum = tb
actual wert
Enver Vaiss at a,b,c 3 22 24
acu! ourPt
marimum = 24
gesurt:
pen@® th
ead
program to find the maximum of
Mumbers ig sucessfully designd and
ence
ANd execurd sith dffereny vous .
qaverore
Scanned with CamScanner
EE EO EepRoots oF & Quadratic equation
ae ON NN
TO design and develop thr c-program tO find the
foots of tH quadreurc eguarron
pigorthm:
step! > Start
steP2 : Read thr vaiuts oF 4,b,¢, d eterminam
gteP3 © determinants = bb ~ qkakc
step 42 it Cdeterminant 20)
oterps | ts Cb+ sqrt (determinant )/2 a)
= Eb-satt Caeteceninans) 12%)
reo 6 EF Caererrainans =0)
greet! Sete = —byaro
Ser 8 a+ (deren erin Z0)
sees S sqrt (dexerminas) Iota
C2 1 pak + aliparr)!
a pat cipathi
sto?
sre 10
Scanned with CamScannerCstar®)
/tead abi¢/
| a= d= Jaa eqre (eh - - ete)
PON A Ve
r |
| aim) |
| Tre Cea] O, |
jh =CbYO ta | |
a
|print vit]
Scanned with CamScannerource. code
#inciude estdio h?
4h include Ema Hh?
ir
s!
ant maint)
{
int a,b, C5
aly at G5
paints (" emey valuts @:"))
Sean£ (pdy-d VA% LA, R0 AI)
dz cqrt (ot Pate) ;
if Cd>0)
t
tel b +4) /@ta);
toe (bd -ylory;
pring (Mth roots are gett am a
a1 BErt ook 2 = 134 \01, 0,0)
natn
sstince);
prinre ("root t
Sep = - DIgeA)
erinst (" eoot | = Ro
3
ese
£ prins povts are imaginary")
3
yexurn 07
okt ey 3105 % Jy
3
Scanned with CamScannereEpECHES input:
eney O,b,c Vays
Er pected ure wr:
rootl= ' coot 2 = 1
pcruct) inea* :
Enver 010 Vaiss 1-2
actual ure ut |
foot t voor? =)
Pesurt a
Fame 40 daserm{nt
yoots oF Hy
ts suCessfuny anaoped and
Scanned with CamScannerTA pereemnine eroee Of Xe
pim: To develoP and design a c-progam to
aexermym the gia ds of asiudint as per
eniered MACKS
pigowthm *
step)? Start
eteP® | PEClave Marks
otePsS * Read atk S
greet © chick 1002 marys 7 40
ceps | FF th condivvan ig UL go +O siept
ese go +0 SPT
ier & * vIsRAY encade ‘s #"
gery > check 70.¢ marks <8 9
qieps | FE HHL 1 GOA exer-a else cate SPE
geod + pIsry verad is 8
eter * hr soe mmasKs 269
4rut goto sieP 2 else chee SHPIZ
pisplay “esac iS cl
chick, moa KS SO
se Plt + te pour, go +0 Stee 1S
pispRy “rade Is F
sterls sxoP
me
Scanned with CamScannerON
| Beciare maces
mews
Cast)
L
Lerint weed 587
mors €269
[pane qak 7 Letins brad is7
4
Scanned with CamScannerfioak marks
erintt Cl ener mar¥s') 5
Scan & (ry by & MACKS 5
TE Cmatkes 7 = 20 B mares¢=100)
C permet Cherads is a")5
%
Fe Creates 2270 ER mares ¢ 224)
& prints CY rad ts ered;
%
PE Cmarks 2 =SO BR ences 2-69)
t prints Cons ae tg c\0"D)
%
TE cengX€s 650)
L Kinet (Vo rad VS FO")
3
cexuen Dy
3
Expected meat
Enter marks +44
repected
mrad 15 fr
ure ur
Aca mew
ensey aries aq
actual our? we
ona 6A
Scanned with CamScanneri e
gest
pen = +he
o studank—i:
c
~ program to dejermynt tm grok of
successfuny deveiop ad and executed
Scanned with CamScanner