Assignment 2
Assignment 2
Date
Poge
ohscigmt-2
2 marka quustans
1 Drawr and lalel sypbela uaud in Jau chart.
1
lam
Proces
Iapot out pot.
Dcision
Conncctor
Prcde fined
pro ccss
Terminal
Flo Lincs.
2Dyfn cdlyoilhm
Date
Page
leuchast:
Start
Readoum 1 and nu
Stop
h whill loop in Cis ud to ualuot a
hat candlion and iterat
bsdy until thu condition iluLnA du
cAssMAte
Date
Poge
clse if lcxpression 2)
Statcmcat i
3
clse if (cxprcssion 3)
statcmcnt i
3
lse
statcment s
3
lssMate
Date
Poge
Lhile
Lnly canballd conalld logp
2 o semicalan at
he thu nd of th do-ul
uhil anaition. Candiion
3.Jhe caondition 3.Jhe condihan statmu!
sttmndi ad i ad the nd o h
th luginning
4 marks qustiens
a lidean algoithn ta dilumin1 thu giuen nunlur it
Algorithm-t
step l : slart
step 2 (Take input) Rcad Number
Step 3 i check I Aumber t2 =0
Then print : Nis an cVCA nombcr
Else
Print : Nis an oddnumber.
step 4: Exit.
Start
Lnput Num
Re sQRT (Nurn)
I2
Jrikc Oum iS Q prime
IF
Dumber.
IR
Write Om Ís not
prime oubec.
j= iti
Stop
1oDaw authaul
thy numbu
fa chuking lagut umles
cASSMAte
Date
Page
Start
Col, n2n3)
Read 3 numbers
Display n s
yes qrcatest
Display na is
qreatcst
Display ns lis
qreatest
Display all
are equal
stap
classate
Date
Poge.
Auitall LNAnpl
Print () is used to priat the output on thc
display
Scanf () funcion is Used to scan or store the
Something
#include <stdio.h
# incude < conio. hz
Void main ()
int ai
print f (" Entcr a numbcr") R
Scanf ("% a ) i
printf ( The number that you catered is eda):
# include sstdio.h
# include <Conio..h
Void main )
int i
clr scr Oi
printf (" fnter a numbc")
Scan f(" hd",2i)
i 2 ==n? print f ("od js eVen ",)
print f " dis add", i)i
qctch O;
15
Keyuwsal
alhuadly knaun te hi canypila
iaDing uhich
duaiguslh duiag
ariale un nam_giuen toa mumeLy localion,
dalaty1 duing hu pogsam txLCution.
halde
Nution
anlyanL alu hueugbau th agam
For ( i e i le 4 ; it+)
ftokal tokal +marks [il:4
printf(" Total is %F" total):
pce C- total l4 1
print{ (" perccntaqe is F" pcnc)i
qctch ()