You are on page 1of 7

tome

Assimgnment-

uestion 1
proof Swe tha hos 3
bags that She wbnts
tu takke on a
ight They weigh A,B& c bags
She wants to Check in vacHy bwo
especth vely
tne one
of these beugs & cann remaininq
boa with hen he Q Line restrict on SO

tha he total sum of wighs of Do3

checked -

tn cannot exeed D Fg
tha Ce

which is cannied
and the weght Of bag
Hnd f Proo F Swetha
Cannot excecd E cg.
Can take caull three bags On
fligh b

Input formot

Inpuive space Seperated inke gers A,6, DE


Out foYmat

Print "yes if Proof Swe tha can take al! thhe


three bags with hen or) n o if She canm ot

con stioin s

A,B,C- 10 I n p u t: 115s
15 D C= 20
out Put : yes
5 C 10
pOot Swetha
Evflanoi on
Can check in the tirst& second
b (1t 1- 2415 ) Canzy the third
bag th hez
(s)
ues tion 5

conshve a Pyamid
Sheetal wgns tv
o
the nurmbns she sveny busy
using
5myak -2022
crafting Cheai ve ants for
the
you tas TS help Sheekal to print
Pi ram'd.

8
12 13 14 LSs
C program
Hindude 2Staioh
int maunl)

int i
tems
intii
int Cel
Forli 1ic- Sii4+)

for (1ij iy d+ t)
Pintf ( 7.d",c)
Ctt
3
PYintt(" \n")i

re burn 0,
Printt (*1.d", i)i QuesE

Sum Surn+ Ji
using
crafti
F (Surn: # y&R Sum, = = 2)
4o
Py ra
Printt("noE a amicable numbe),

curn 0; 2 3

- uej Hion 4 112

ven kat is
inhres tecl in
Solving nurn ben Pr=
saies problems venlcat is bus y in waching
woald Cup leaque yOunthsc in help. venka
to find Sum of Folowng seics
1+ 3 2 /313 + 5^a)5"3+712/713..fI n tens in
inE
C-Progran"

indude cstdioh
tnt mainl) fo

int ni
ftoat Surn= O;
Printh( he value ")
Scan f ": a",
en)
for li-1 ic=nit 7)

Sum ftoat o/ ta*i - );


printf urn of he Ims "/.F Sum);
rehr ne
as

ane
nown
Numbens
Prope»

330 u e s t i o n - 3 - T w o

if the
Sym
df

mica ble
numbens

humben is equa
to ofhe
bv
divisos of onee um
Amicable
284 ane
numbe. ex220, n egens
two
that acceps
WTit a c' malule Armic ode
o 03
for those humb
&Chec
hunben (oi Yot

'tProgi am:

Hinclucde estdi o h>


int mcnl)

int 7
int i
Scanf (" dhd", &7 ,y)
inti
int i
int Surn, : o;

int Surm:
of n ");
Pintf (" factors
forlI;ic-z; it+)

PintF("7.d",i),;
Sum Suml+ i,

Printf ( \n");
\n°h
Pm facors of y:
for (jt jeysjt)

if Y/ = o)
Case b" printf ("8ASIC");
brea
Cose nc Prinf ("coBoL);
break,
COsc "t printt ('cOBot"%
break
COse D":
Printf('d BASE u");
brtak
cOse "d prinHE ( BASE I
breok
case F " pintf " FoRTRAN);
breakj
Case f": prin tf (" FoR1RAN ");
break
case'P" pintf " PASCAL");
brtale
Case "p pintt lsPnscAL);
brea
Case V* printf (vvisuAL Ctt")
break
case 'v'
pnF (vlsoAr Ct+");
break
deFaut plintf ("YoNg inpu")j
eturn 6
has choostr ro install
Bhavimd
a e t o of alphaht
n a

Hint The p uses

yoL Pogan oackage avcuilhle some


$ampie input out put n e given hel ow)
Staternent to choOstn
using the SwIfch
&dusploy The apprepiae
Input Output messog. Use the

A)a Ado abe to be


default
if
6) b Basic a messoge
display not
doe
C)C Cobo The input
abve
D er) d f
d Base 1 makch ang
fon tran tetteys
pas co
P o)P visual ctf
V o ) Vv

C - prog Tam

# inotuele < Sta1oh

int mainl)

cho Zi
\n}
PrintF " Tht al phahet :
Scant ["Ac", uz)
Printf " selecrd anguage
Suoitch (2)

caLe "A": prinf ("apA")i


brrak
Cose "a" pintE ("n0A");
breaf
case B" PrintE (6AS1
orrals
indude <Stdio h?
int main)

int A3,c,D,E
volues of A B C D ;
The
Print &c,RO, 2E)
d7d, kAkB,
Scant (d'7.d'/ d7.
10) u (ftB +C c :
Dy
if [lac-1o) k& lBc: ro) xxlc ea

(t1))

Printf yes "}

else

Printf ('o ";

nchuro

Question - :
somê
Bhay tha is tduin to instal
and she is goinq
Programming langge when
The list i as

through the ven ist


euen a Leten1s iveh the corres porcing
on
he screen-fo
aruage s displa yecd
Bhawitha Selechon to he installed o
hen
6haui tho entos A(oa
exomple i f
she co select 'Ad a' Janguage tika
these nahg Aanguage in whtch she Can il

wise these may lcnguage in which she


Choose Fnd ouu hrch Janguage
Con

You might also like