Professional Documents
Culture Documents
S. no Input Output
Algorithm staot
Rend P, t,Y aluek
Si Patar
oo
Prart st
sst
Flowchart
Staot
si = P t
too
Print s
Stop
cOMPUTATIONAL THINKING FOF
Execution:
Testcase# Testcase
with eacn questi
questions
assigned distinct marks for each of 3 questions. This means no two questions can hav=
marks. Find the minimum and maximum marks that he has set the paper for. Solve
same
S. no Input Output
Algorithm 1 stat
Rend mC]
3.) Puint na ms
3 m (63>m],mC) >ml),
3-) ebe it (m>mlol, mj>m{z), 3z) Point roa="T7
5) ebe ( m i i J >mlo), ) , 33) P r t o d = m[z
Read m33
m E1 F ml
7
a
m
m
mC
LEm]/Lmac=m
& Output
Sample Input
Output
S. no Input
mim= 30m
Algorithm stmt
Reod , talus.
a 34* , b= 2*
i4 (acb
4 che Prumt b
ssp
Flowchart
Stant
/RLad ,y valuts/
o3+
b 2*
F
ocb Printa
/eriedb
cOMPUTATIONAL THINKING FOR STRLJCTU
Execution:
t incluce c stdioh>
irt aimC)7
irt ,
Saont (/d, 34, 3)
int a 3 *z
(nt b 28
ie(acb)
PrintfCrin =
hd', a);{
cbe rint (*min = dJ", b); f
void f
int a
a-20;
d0:
printf(%d"a);
voidd)
int a
a-30;
printf("%d"a);
int main()D
int a
a 10;
printf"%d", a);
f0:
return 0;
Output: 10 30 20
a = to Print a = lo
a 30 Puta= 30
Prin a = 20
Page 63 of 368
code:
for the following
b. Predict the output
Wincludecstdlo.h>
vold maln()
auto int num;
num 20;
#include<stdio.h>
void increment(void);
void main(0
increment();
increment();
increment();
increment();
void increment(void)
auto int i = 0;
printf("%d", i);
i=i+1;
Output:
Page 64 of 368
u p r s e d i t t t h e t u t u t t t o thes f o l l o w i n g o d e ?
stati terne()
it ifnt t,
it
int j 1
1,
i o P r i r t
ntf("dn", )
1,
rmaint)
sticDermol)
ticDeno), 3
J =241
- Pit
srput: O 2
i i=2
clude«stdio.h
atic int gint = 1;
aticvoid staticDemo(){
tatic int i;
rintf("%d\n", gint);
Int gint+1;
nt main() {
taticDemo()
aticDemol);
output: ot
Page 65 of 368
Session:/
Date ofthe
coder
Problem 2 following
for the
Predict
the output
a.
#includecstdio.h»
Tii 2
int fund);
intnum5
intmain()f
r i t nwm)
fun value %d \n",num),fun();
p r i n t f ( " ' n g l o b a l n u m
- %d \n ",num);fun(
m3 ?ru t
value
p r i n t f / " n g l o b a l n u m
",num);return 0;
printf("ngiobalnum
value-%d \n
Printnur
Output 23 S S
#include cstdio.h>
extern int a;
int main()1
inta 20
Output:
Page G6 of
368