You are on page 1of 13

typ

/wAP
to print da 2107I AD5 RAKs H.c
h>
Include
<stdio
Conivh
Include
<
27/12
Woidmain C)

O puw
10 1 3
doukle d-
2.

2 101
float f =3
3 14
clyctY

printf (1 An, d);


phnt e \n', f);
gerchc)

wAf toiu ca se tD upPt Case

1I Wite a proqram to find sum

#9nclude <stdio h>


fnclude 2onio h>

Void maint)

dgt a,b,C n pu
a 5
cisc)5 b 5
pinte enu the value of a,b
Outpr
Scant(.d%d', &o,4b)j C 10
Ca+b
printf (7.d, c)}
qercht)
AD 0n modulo divsi6m
6 #Include cstdio-h
include Lconio h> o uhut
Void main)
nt , b, c
clvseC b 5 p5
phnt f Cnti to alue of a, b) C
sLanf Cd hd", &a,b) ; a12
C:ay bs b

C5
getchc)

peumels of rectange
include 4stdio.h
ndude 2 tonio h>
Vofd mai n C)

clYsCrC)) a=10
b5
pint FEne the
value of o, E);
s Canf ( d d', &a,+b) C 30

C (+b
phnt f C%d", c);
a ekchC)
adius,
Diameki acir (um terenCe
#include< stdio h> OA rcle
4inlude tonio h
vold maln)
, ;
2 Aistt,d,
clysoC) Outut
pintf enei the Value op )
Scanf ("% 18 S
C 3
d 2
a 3.14 Y; not mehoned

2 314 Y;
floanng point fomat
int(t ', a); noF Gn tud
pintf C7.4 \, a)
Pint
Ch h', c);
gerchC)

Cm to m ,um
incude <s tdioh>
# indude
Lwnio h>
Void maint
loa C,g
csa
inirf ")
entu th yalue of C)
Sanf " , c )

wwwrs ,m)
Duy u
Pintf f kilometas \ h , );
C2.00

erch m 2 mekrs

K O.002 kilbmek

Celsius to Fahren heit


mlude < obalimh
# inlude <tonio h> T (F-32)
vOid main)
ntcdsis -alhaenheit

Float C, F
cls)D ouhut
C 36.5
Pnte entu he Valuu of c)
F 97.69997 Fhreil
Scanf ( " );
f Nc)+32;
Pintf ( fahrenheit", f);
ChchC)

ohrthet to elsius
Ynclude estdio-h
O# 1nclude Zohio h>
Void mainc)
2n f

cdrSCYC)D)
Printe . enuthe vau Of
);
sCanf C d)
(r-3a) ; Oulf
e o.5) f-to0
pintf ( E
celsius
C 38 0& o02 elsius
gerth)

to yearS, w a k s
days
h>
# include <S io
td

#Includ ec conio h
Vord main )

int dayS Output


float yeaTs, weut s 140 day s

clr sCYC)
o 38 35 Yas
pnnrt (Cnte the valu of days); 20 weats
SCanfhd, dau4s)
Yeasdays 3690
weeks =days 7.0
pintf(f years eas);
Printf Cf wets
w' weets)
etch C)
( Ind powee vf a numbe)
# inclu de stdio h>
include Conio:h> a 2 b 3

include <math h>


VOrd man) Outp ut
C 8

(nEa, b, C)
CsCC
P intf Cen he valuus vf ab);
scanf (%d hd,
a,db);
C pow (a, b);
printf C" d, c);
9elch C);

1 Sq,»t of a humbe
ncude <stdtoh>
< CO nioh>
n c ude

# include 2 nmaHh h>


void mainc)

n ab
I r s c r t

of d ) ;
E n t e the valuu
printf
Sconf d, fa);

Sat (a))
%d' ): Output
pint
16 b 4
getch ()

Turd angle of biangle


t mclude Stdloh>

n clude
2 conio h>
#
Aotd main C) in put Oulub
C 70

inr 4,b, C
clrscC ;

pdntf enle the Values of a,


Scanf (d hd", da,4 b);
C- 190 (atb);

getchc)
3/1/2022
n
mahc pwaopetah
per form all the an th
nclu de <stdio h>
nclude < Conio.h>
VOid main )

int a, b, c, d,c,f ,
cl7sCC)3
Pam ente the Values o f a, b

s canf (%d% d", &a,b)j


C at b

d a-b
e a b
f a/b t

Pintf ( %d, d, Y. d, %d . a6, e,f);


etch)

input enter the values of a, b o2 25

Output 2,E,20,5 29, 21, 100,G


to find avea of tianale
w t e a pvgyam
fnclude Stdi0 h
#include <onio hy

Void main C)

n bh,area

pante ente the valu oE b, b);


sCanf d d', b , h)

aca 0'S A b h;

pinefo d, avea)
9ttthc)
npu
ter the yalus of b,h 105 2

Outpul 25

wntea proaram to fnd


arta Of equwlalsal tnanqlee

include2 Stdioh>
include 2 (0nio h>

#include C math h>

Void man

int a
floa area
clrsCY C)
print ente the valuu of a i

SCan C d a) ,

avea
sq7t( a a) /4
inf arca of triangle is 7 , a rea)j

gerch c)

Vauu ot a 4 a
n Put enke the
Yea of tangle is 6 9282033 3 1732&7
and
/wrik a pw ym to flnd u tas, auuase pei Centage

# includeks tdio h

#1nclud e 2onloh>

Void maimc)
a, avexage, peicentage
InE m, , , m3. m4 ms

pnt enki he values of m, 2 ,mamus


Scanf C 7d d%d d%d m, ,4m,,4 mg, d m,.4m,
total= mt m +m+tmsj
average = eetal/s(floaE) total |sco

bercentage = totallsoo) + 100(Float) t0tal/soo loo

pnE C" total marts = d , total


totol)

p i n average - % f , au rog)j

pinFFC pescentage = Yf n , paicentage)

gerch t

input: ent: the values of m, ,m, , m3, nu ms


0 20 30 40 So
Ourul
oto marts IS0

verage 3 0 000000

30 00000 2
Pacetoge =

// 10 Frmd maimum Of thxe numbers


nclude < stdio h>
#include 2onioh>

Voidman)

nt a,b,C
clsc O
the volius Of a,b, c":
oint f ( ente
sCanf ("%d %d d, da, db, dc)
ab (a>c) ? pintf ( , d is qreoles, a pintf ( d isqrse

((6)? pintf ( d isgreales 6) pintfdisqeabe,


getch C)

2T 1000 20OU 3 20 160 80


, 12, 13
in pur
320 is greaks.
l 000 is qveaker
ouhut 13 is qyeai

/Swap twonumbers
ttnclude Stdjo:h>

#Ynclude 2onio«h>
vofd main c)

int a, bj

pnrf ene the


valus of a, b
Scane (hd'h d £a, Ab);
atb
b a b
a=a b
Prntf (zd, d a,b)j
gcch)
toput 5 10
Ouhul (05

Swaf f two numbert

include <Stdio-h
include c (onio h

Void mainc)

nt ab,C

print (en tle yelue Cf


Scanf 7d . A n ) ,

C atb
QC-a3

bC-b
pintf d d,a,b)

getch

9nput
CLtput

a a Of echanale

flude < Stdi oh>


rltde tonio h>

yoidmain
b . area j
int

clrsca

(enke
the values of )
b,h);
f
d ' , 4 b, d h);
oint

P
d
scanf C
area= b*h ;

( , d, are a)j
printf

gehch C)3

inpur 1o

Oupur 20

You might also like