Professional Documents
Culture Documents
Question 6 To 10
Question 6 To 10
com
PAGE No.
EXPT. NO.
Yucoion 6s
Algorithm
Step 1 Start
Shep 2 Kead wso numbeso a and b
Step 3 Additiem o atb
Step 4 Substractien to a-b
Step 5 Muliplieatieu ox b
Step 6 i f (b==o)
PeinE Addi tion
Print Subshroche
Priot Muliplicotie
Prin Divsom no possible..
else
Divis p 2 ob
Piint Additio
PICHEER Pmin Subsracho
Raint Multiplicaie
Pi'nt Divisonn
Step1: Stp
Sfar
Tnput o,b
a dd=a+b
Sub o -b
mul a x b
False
br:0
Tmue
dive alb
Pmint add
Peint Sub PAint a dd
Print mul Prin Sub
Priot Divician no Pint mul
possible PAin div
Fnd
DATE
pioneerpaperco.com
PAGE NO
EXPT. NO.
PaLogram
Dnelule <sholio., hz
iatmaimO
pintf Enter two numbero h 2
SCanf f ,f',ka,pb)
floo odd 2a+b
loot Sub a-b
float mnul-a b ;
i (b==0O
printf Addihieu 74\',add)
PhiattSubshrocHm , f \n", Sub)
printfMultiplicakhiom f \n"mul),
intfivise not fpsible");
eki
loat oliy 2 a/b
phintf("Addition , f\n"), addD
puintfLSulootan f \n Sub)
peuintfMultiplieation 4\n mul);
Pruintf"isim f",_odi),
PIOREERR
Preturm O
DATE
pioneerpaperco.com-
PAGE NO0.
EXPT. N0
Output
AdddHo: 5.000.00 O
Substrachem 5. 000000
Multiplicahiem O. bo00po
ivision_ not p0ssibla.
PIOHEER
DATE
-pioneerpaperco.com
PAGE No.
EXPT. NO.
Aleokithm
Step 1 Stat
Step & Read a number n
Step 3if(n/,2 = O)
PHunt n w ene
else
Peint n odd
Step 4: Stop
PIONEER
Stant
Tnpu n
n7.2--o Faslse
End
DATE
pioneerpaperco.com-
PAGE NO.
EXPT. NO.
Pogtam
#inelucde kstelio. hz
Lntman)2
intn
ptuintfEntez a numlsen \n")
Seang d',n),
n). 22c0)
PtintfJhe number d i euen n)
Output
Enten a numben 4
Jhe num ben 4 o eNe
PIONEER
DATE
pioneerpaperco.com
PAGE NO.
EXPT.NO.
Gusotip8
Algoruthm
Step 1 StanE
Step 2 Read age
Step 3 (age18)
Prunt The fuon eligcble to vote
ese
Pint 1he Benan à n6t ebsible to vbte
Step : Stop
PIONEER
Stan
Tnput ge
0ge 1 8 False
hue
/Peason o not
eligiba tovotz
/Fepson o
eligrble to vole
End
DATE
pioneerpaperco.comm-
PAGE NO.
EXPT. NO.
TLOGAam
#ineude <stelio,hz
t maim O
tntage
ptentf CEntor tte oge: \n");
Seanf C/d", uage)
age 18)
PAunt Pevon o ellgble to vot;
eke
printy Peyon tà noh
elisiblu to vate );
etwm 0
Output
Enter th 0ge.
19
Peason in eligible to vote
PIONEER
DATE
pioneerpaperco.com-
PAGE NO.
EXPT. NO.
Queotiom9
Algotuthm
Step1Stot
Step &: Read the numlsen a
Step 3: H(a2o)
PeunEhe number posiive
eke i(a4 0)
PPint Re number nesahve
else
Prunt jhe number Z010
Step 4: `tbp
PIONCER
Sta
Tnput a
ao False
Yhe number a
posiive nue
/ She nurnbes 3eMo
/She number a
negaive
Fnd
DATE
pioneerpaperco.com
PAGE NO.
EXPT. NO.
PALDQaYm
#Includs <stdio hz
int mam Oi
inta
ptuintf Enla o number n
Output
0Ener a num ber
he number wposihve
Enten
PIONECR anumbeh
6
he numlbe 6 nogative
DATE
pioneerpeperco.com-
PAGE N0
EXPT. NO
Ques ti om 10
PICHECR
Stort
Tnput a
Switeh(a)
Yaue
Aue Print he weekday ó
Sundoj
falSe
Jaue
2 Print the weckday o
Monday
False
3 uePhint the eckday ó ueoday
False
Jhuein the wek day io Weclneo olay
false
ue
Pint the wee Kday vo
Thusday
False
ucint the we kdoy v fri doy
False
hue int Hhe wee kolay o Satwrday
Fal se
Tnvalid input!!! Enter a
Defaul number to 7
End
DATE
pioneerpaperco.com
PAGE NO
EXPT. N0.
ÍMgham2
include<stdio. hz
int mainO
int a
ptintf Enter a number
Seonf.d",%a)
Suwitel (a)
CaAr :
printf She weakdoy Sunday,
axaak-
CaAR
print he upeek dasy io Monday
bHRok
Cons 3
puint he weskolay leodoy
oxcak
Cooe 4
phintf Jhe weekolayo Wedunaoday
bheak'
Cose 5
PIONEER paint Jhe Weekdoy hwrsday
bteak
Case 6
pzinfl Jhe Weckolay o Eruiday
DATE
pioreerpaperco.com-
PAGENO.
EXPT. NO.
bPLeak
Output
Enten a nunmben:
he weak olay o Monday
(UEnter a numberit
h e weckolouy Sahurday
(uEnter a number: l0
Tovalid Input nter a numbento
PIONEER