PPS Practical File 1
PPS Practical File 1
Afm Aukjects
Lute a pMOqam that accept ho mawks ot5
ab taintd by
ard firds th um anod peucuntag1 mauks
th atudent
BuogAam Code g-
# include <Stdio h
# include konio.h>
void mainC)
csCY ) ;
int 0,b,C,d,e, Sum, peurent@g4
Puintf(" Mauk obtained in English);
Scanf hd' 2a);
Puunt (" Nauk obtaiheol in Mah
Scan( d", &b);
Punt? Mauk obtaihed n chemisty
Scwnf " 4d", &c);
obtained in Physica J
fuintf(" Mauk
Scanf (" hd", &d)
Buntf ( Nauk obtained in ompute ,
Scanf (" /»d", &e);
Sum atbtC +dte;
(Sum /5oo) * loo,
Pexcentage
Puintf (Tatok mayks obtaineol = d', Sum;
Puntf "Rcentag e = %d peucentas9);
getch C
Output Bucgstam
obaind ún
Mauk
English 80
Mawk Obtainnod in Math 90
MOuk obtalnod in chumistry 100
obtained in 00
Mawk physica
Mauk obtainod in Computer 100
nd
nol Compoud hfestTho psunipal amaurt, Rate f
inttest an+ime au entaud thsuoygt tho keyboa
seuam Gde
indude stdio.h>
includu Conio.h
includl K math h
Void main ()
wuite
wute a PHgua m to Calulate aIO
ofa Cicl.
ogam Gds
# inctude <stdlo.h
inclucls anio. h
+includ <mah h
Void mah ()
ChsCY(
float r r, aua CY
Puintf (" Enteu vadius ")
Scanf (", f " s7);
Pi314
0ua piPow (3 2);
Ci 2 Pi *
Puntf" Aua = f ", axIa);
Pauintf ( rcunfenenes
"
f", C'x);
gutch C);
Outpu of Puoguam_
*
Enteu adius 2
Awa 12-56
CirCum#euence 12 56
Eyperiment-4
Afm
dh
wuite aPgMa that accepts ha tempenalwu
aurd tht
ent guaa
entgvads conveuts into fahanhtt wing
fr mul a
Puogom Code
#includ Stdio.h>
# incuols (onio.h
void mauh ()
c se C;
int C float F
Puntf (" Ente tempexatw in centigaol
Stanf ("1.d ", &c);
Pauintf (" Fov Fakvonhait "';
F((9/5)"c) +32 ;
Pauint-f ('" fahsanhei't = %f", FJ;
gatch (
Output of opuam
Entex tempexatuwu in centtquod 87
fo Fahunhtt
Fahenhit = id8.6
Expeviment -5
Aim
luite PiOgHam hat of two vasuabler
Sunps valurs
usin a thiud Vauable
Puognam Code
tt include
Stdio. h>
4i'ncud Conioh
void moin ()
chYSC ) ,
int a,b, temp,
Pauntf (" Ento tuo values"J;
Scanf 1d hot", &a bb)i
Pauintf (" 7.d",, a))
a-
stintf ('b= 7d", b);
temp a
a=b
b tempPS
hds b= %d, a, b),
Puintf("\n Afe suappîng, a
getch C)
Output of Pyogsam
Ente tuo alue 58
a 5, b 8
Afte sapping, Q:8, b: 5
Am
ulute a
Huam tho checks
pnttxtd by th
enteto
wey a whathu th
the o niumbe
uwo
r
eoual a not
RuOgomde
+
incudl e stdio.h
+nclud! Conio h
void main (
ClYSCY ();
int a,b
Psuntf ( Tnput the Juo
Scanf ( ld d", ba ,&b):
numbeuJ
if (ab)
Pauntf (" Tho tu numbeo au euas
elae
intf ( n Thi tu0 rumbeu a nat uas";
gttch C,
Output of AHORHam
numbeS 5 5
Tnputtho two
Thetw0 numbCHS aHu eguak
Eypeviment7
numdea
+ inclucl Cohio h)
Void mar'n ()
shs (); num 2, num 3
Int numl,
num2 , Num
3 \n J
num1
Enttr the
alws af
Puintf ("
Scanf d %d /d ", &numl, &num2 16huum3 \h
nun3: d
%d t
Puuintf (
numi= %d \t num 2
hum , nNum 2, num3);
num 3)
# (num! twar
thr n\nJJ;
;
among
1 the guadest
f ("
num
Pacint
num3) \n);
f(num 2 among thuu
else num 2
thu grealest
Pauntf ("
amorg t h r \n);
amorg thvue
else num 3 is tho Jategt
Punt f ("
9et ch C
Output of Puoguam
Ente th values of Numi, num2 and num3
6 8 10
numi 6 num2 = num3=10
uOgam (ode
Hincludi Stdio h>
ihclud (onio.h>
VOId aun ()
cls )
int N
N);
( E t 4hu valuu
Pauntf
Scamf (tol "&N):
(Nh2 - 0)
Psunt f ('N is even
if (N= 0
Psunf ( N is odol );
gotch (;
8 ven eak
Alma
PHOgHamn
code
Cod
cl SCY ();
inta
Ente t h uga );
Psuintf(
Scanf hd ",sa);
if (a 4 ==0)
elge
nat C leap yea ,
Puint f ('" Yeau
gutch ();
Output of Pogam
Entetho yea 2020
Yeau s leap yea
Expevinent-10
that arepts mouk s of five
subjects
HOgHam
Ai
aluie a to
cvdf hsa pecentag and puints guades accoding
coiteua
Punt A '
Between 90-100
Auint 8
80-90
60-80
exint '
60
Psuint D'
below
BuOgvam Code
# i'nclude <Stdio h>
+include Conio h
Void mai'n ()
13e
peMCenfoge >80 6pecenta ge = 90)
do)
'geif( ecentoge 60 A& euctntogi
Pouintf("n Gnods C;
elge
gatch ():
Output of Pogyam
Math 00
fMauk ob tainad in
MONk obtaind th Physics O0
O0
cloSCr C);
float
cha n;
Enteuhe valuu o a y
ano n);
eaintf (
&x ,6 y,bn);
Scanf / f %f2C',
Switch (m)
Case
Z X+Y
break
CoSe 2
Z X-Y
bseak
Case3
z X*V;
Break,
02e4
Z /y
pseak
dufault
Pauntf ( Value nad valiol J;
Buindf ( Jmult f",zJ;
9etch ) ;
of fuogram
utput of
10
Entey the valu o , Y and y 2'3 +
+Y =
S. 00 60
Experiment 12
Aim3 all nui0Cis
a Au09uamto Punt
aP
+hu Su o
(ute
9ven Nunber
upto
Puoamn Code
# include Stdio h
# incud Conio h>
Voicl main ( )
CSCr C)
inti Sum : 0 num
a n integty ntmbe»r \n
Pintf ( Ente
Scaf ( %d ", & num)
for(i= 1 <=num ; 11)
Sum: Sum t i
givn nwnioen3 ")
all nu6exs upto
untf "Sum of
Pauintf (" hd", sum);
gatch CJ;
Output of Poram
Entey any number 5
t inelude Stdio.h>
Hincluo (onio.hy
vord moin()
clrsy CJ
int fact =1 , n
Psuintf Ente thu num n J ;
Scanf %d ', an)
for (i= 1; fe=n ; i++)
foct fact
*
i;
fad);
ol is %d",
n,
The factosuia of
Psuintf('
gtch C);
Cocde
#include <Stdio.h
H include Conioh
Void main
cIYSC
int N Sum Odd ,Sum fveh , i
Pauintf ('Enten th number ");
Scanf hd",&N); Stun 0dd 0 Sum Eyen =0
fo ( i 0 i N it+)
f ( 2 =o)
Sum beF Sum Even t
S Od
Sum Sum odo +1
Psuintf( Sum of
even numbe , d, Jum Fey
Odd rumb = 2 " , S n cdd
)
Puin+f( Sum Gf
3etch C);
1
numbe 66
the
e eveh
u n be = 12
m 0f
odd numben = 9
m
bxperiment 15
Am a uagam to Puint th fibonacci Sesue
a l t e i t e
ram Code
înclud <Stdio.h
# includt <Conio h>
Vord man ()
chrsc ()
int
int 0 j-1,b,k number J
Bunt (" Put thu last limit for fibonace
Scanf(.o", 4n);
sint(" %d", i);
b i+i
Rsuintf (" )% d , b);
b
getch C)
Output of Puogram
for tibohacc number 5
Pud the lat limit
O, 11,2, 3
Expeviment -16 22
clrsc (J
int N Count =o, î;
uint f( &rte any NumberI;
Scanf (hol", k N):
Count t*
f Count c:2)
numberi prime "J
Puintf ( "&rteol
gutch ;
rput of
utput
Paogram -
Numbe5
ary
numben d pmme
n t e u t o l