PPS 5th Assignment With Qna
PPS 5th Assignment With Qna
assign values
inikalise tae vaue at combile time ond
duplay tem.
OFlouchant Pom keyboad ,disolay hem.
Start
No
Yes
Print ai].
No
Yes
a); 2 printf("
:\n ane vales he
sahn iniiai the Before þrintf
HAUSEH
bionix
o},i; 5,69,
,ioj-,24,
3,3, aint
mainl)
#include<stdio.h7
Crogram ;
Stop
I:^i+1
aT] Print
Yes
No
i:=0
vas the
inihallizah
on au: Aten Pri"nt
i:=i+1
ati]
nte Read
00 90 89 I8 64 56 45 34 23 12
valuen tue ationinihas ter Af
5C
45
34
23
vaes: 12
te enter Noo
3 2 1
are. value the the Before
OOutput:
3
values heaom all.s inih Affen print
scal%2
ai) 3
vaes the entor Nqþrint\
o
3
Find the average mmbo wing aray
Flawchant
Stant
No
is2
yes
Reud ad store
Vaue for a ]
i:si+1
No
2
Yes
Sum :SAM+ af1
avg:= sum 3
stop
cProgt
#incdud stdio.h
main()
int i
loud sum=0.0, als!, avg
þrint (" Enter hne doable denents:n");
orl i-0;i(*2; iv)
3
for(is0, i(=2; i+ +)
Sum Sum t
avg =sum/3
value n o-2 avg)
3
utpu
Enten Hree doube elements :
12-34
5618
89'DI
Ten avetage value 52:11
2Find the avouse humbey of J0 inbagers uing anay'
Stant
Print ^Enten 10
integen elenents
No
Yes
Read and store vaeo
aCi]
ik=i+1
No
Yes
Sum:sum +a
i:zi+1
avg= Sum
Siof
*indude (stlio.h)
maàn( )
int o],i
float suna 0.0, avgs
rint( Enlen 10 integeu dhmutsn);
for (i=0, ikoi)
3
Aorizo, i(=9;itt)
Suma Sumt
um+ aiJ;
arg= Jum/10,
prir Te average value n
.02 avg):
Output
Enten 10 integer elements:
12.
23
34
45
56
89
123
33
The avnage value in 57-20.
4 Find min demert witin a Wst of 4 elaments
Sant
/PrintEnterz dements
i:z0
No
Yes
Read nd stere value
at aM
i:zit1
min:z aLo1
it=0
NY
Yes
mina
Stop
main()
int a min,
print Enton 1 integez
dements:
3
min
3
printt(" e inimun value in
3
Ente 1 nte
integen elements:
-1
23
4
Vaue n -69.
5) Find maz elemont within oa int of element:
Step1- Stant
Stek 2: Enten t integer elmentsi Print.
Step
#inclade stdio.h)
mun()
al;
or ( iso, i (=bi+t)
maZ a l ;
-12
4
5
23
The manimum voue n 78.
9 Consract Rrom binany to
decimd Jot101 a 45
Step i: Stat
Shep2 Inih de nmay a
with 1,0. 31, 0,1 (at
Stejp 3: is0
Stelp 4: j:-0
Steb5: For i75
Stufp 54: deo := deci+ (aiJx 2')
Step 5:2 =jti
Step 5:3: i:ai+1
Shelp & End ot Looe
Stek t. Print The deimad value is de
#incdade (stoi o. h)
include <math h
main()
a[inil- a1;
a[i-] vad ;
print Aften the inserhon the values
vabues ane:n
torl i=0, i<=4;it)
3
Enten ylun elemens.
2
3
4
5
Enten tue value yo
want to insent: 420
Enten the poshon yo wnt to insent 420
3
AFtee he insech on e
1
values e:
4 20 3 45
bement Grom
O Algorithm; sheuife hakon:
Steb 1: Stant
Step 2: Privt Enter yow elementy:"
Step 3? i:=0
Shep 4: For is5
Steb 41: Read amd shre te vale ot a7
Step 42: i:=h+1
Shep 5: End o Loob
Steb &: Prirt" Enter ne ihon you want to
delete :
#indude <stio.h
main l)
Val= ai-,
for (izo,is=5;i+5)
þrint(7.a a0);
3
Enher yn elements:
l2
22
45
54
breuk;
Teacher's signature with date :
3