0% found this document useful (0 votes)
26 views23 pages

CPP Lab Report

The document contains various C++ source code snippets demonstrating different programming concepts such as displaying a greeting message, calculating the perimeter of a rectangle, generating a multiplication table, and checking if a number is odd or even. It includes examples of using classes and objects to encapsulate functionality. Overall, it serves as a tutorial for beginners to understand basic programming structures in C++.

Uploaded by

maheshayer777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
26 views23 pages

CPP Lab Report

The document contains various C++ source code snippets demonstrating different programming concepts such as displaying a greeting message, calculating the perimeter of a rectangle, generating a multiplication table, and checking if a number is odd or even. It includes examples of using classes and objects to encapsulate functionality. Overall, it serves as a tutorial for beginners to understand basic programming structures in C++.

Uploaded by

maheshayer777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
w= WAP in ext TO Display greetng messaye? Ht Molude ¢tostrenr> MSM namespace std, me mame Cout Ze" Kelle, Good. mening "2c endl} tetan o; ae 4 Hello «Good nrg o4 wap fra cpp to culate the perimekr of vectongte. | Source code | Zouree code abiaclude Crostreah>d | Using namespace, stl) int © makacdé | In ee ; | court oo « er tong breadth ce erdt) cin a 472b) = 2é™ (At by i, ; f pec the penmeler of rectangle 's "ZeP, ‘Ou ” output . veturnd,; Balls eet ° ite § ere of weeks 1s 20 — é L 7 ve CORP in CP? to comet na to fe es inoletede Cres & earn hs m isa! tnd Sena © st Enter or nope) (atscr’ 16 1B floct ne, ic; Endian paisa is 10; Cub Ce"'Pnker a nepali Paise,'"; en 22. AIG! baa fees Qd/n6; Gbube, tien Pasa iscete; veteand; 9 Table . Generate muluipieabien Table of entered Source. code He Melude Llostream> usa namespace std; Pat raino$g int 1; Cout ce tenke a umber wor want to get mulapiecatton rable! ecend£; Cin, for Ciné fet) ie210) i+ay’e cou Le nce"* "cel ec£ce MeL: g retumd, D> sntera mimihen es oat & gel muihialed able? v® 3 int ny CoutceEnker anum ber: "Zc endl Chyn; iP (Nn 2 2238 ee out 2c"sven"; eset prmitlods}) cok cc" odd", Yeturnd: 2 Draod a pattem. Spuree. Code ht ncwde Clogheom ld using namespace stl) wt meaincr flat pesyipedy ie fort inb 328) jazi; yt40 cout c}) g. coud ce, end 2) 2 VeLLVNrO ) Check wheter the entered number ?s odd 0% even. AE include Cros team-h> dalge namespace. std! mt “meant rs woot PP sys www ce , eee ee S atbuapo ye sy hhdod 4 ss mre 9 Bn 2 0B Jquryab sgjauuad , 77 HO) 1 dipepunad 77,5! apblegzon f° (aig) airiad BLE EMI 2 Apuorr wpprong. 7 pbeal 0 123 i 2 owe #4 ¢ | fd vurgan @yyxt rd i Wi am Paw! ypu) qauiad PPA fas amndsmuay Susy Ming SO'7 PPP | | | | BP BIG | ccxrougt Peso aphiogon, po spread 24 4I™IP) «GQ | me [@ varegay Obugaae Journ qu ¢ GPs 22,,j Gunner peeg ‘91194 22.9 n@2 30 brgaaG PION " PAS a2ndoumy Cry, ey <9 50) 72 OPA unger Susn 2 Dossaw. Sugaah hindsic JE “aN 1 ee TG TSE Ra, Sk RT aaa = q “Ousrgay O90 2 sums 3 Qwnw qui ¢ & | KU 2225 TF LPP 1 Xyy PF UP OD SH! (od27! Ge! Jung ay} Cu Ky SN F Plea IP,2190L qwru bb 439u3,,27 3e? Cu Qui : 30D Finw PLO" | (PIS arudsoun ws | Comeau} SQI2 SPN)PUL pe daw qrxouabh @ agriudygimnw gob a gua neh vo | 20926 Pavequa f° Plael uegnrdey Qupnuee 7745 bsind Umipy. PUL 27 nD ; Q@ UAE 12U CEW? TPO 21d eda 9 AUB 11 27 re? + 2UIRO Rue Ae R (2) Usnjon 6 94/ QW 3:0] 17! POP OA ayy 3(Qu Poy) Aue) » PIS BIPASAWRU bysy CY. M79 kPSO1D PPNOW a Egan Quen 21 @ DU guanuep ® oO) $1 ASird unspur Y Wed qdIV L9Uz . 3 (ecc%e we check Weather eyan Br bd. Us (Sduvce code r Prelude, Clostieamh? “sie namespace fc Void c¢ Cnt ry§ #ar2~ cos Cou Ce" Sven?! 3 a ase € Coub 2e"odd"; 3 wn maine 73 Mth; Couk eo" th Dn; Oe Ch); tefurno; Enkew Q namber'” ert 2 DIaw ce pet fern. Ce ft Melade Crostreant ND Usmg neunespae std) voiL pattermcré ferme (255 (p28) I~ for Cint f24 550053 cout Ce; wld jee s : cout 26 ert; iat mance ue pattern; eben O° m5 conceps of finbirn Salter eran bene Odd Y eT ee 7 2) Drspre Greeting message Using class & object | Source code Fi Clucle, C ios bream SM3 namespace sk class greeting § | Pubite : | Void Béshal(); L Void gueebn 1! Béshal VE , cout éc “Kelle, Good morning Wecendt; Jj in€ meine § Ireebng oy 3 Bishad; netan oo; out Hello , Good MOr7g, , perimeter af rectangle using concept of lass > Soave SAS runclude Liesttan7? — usmg namespace std; class perimeter § int 4,6, public. peo var get: coke: id perimeter: etclatacst vor cpotce ened a length & brecelth' ce ent e: cin2h77b) void bistro perimeter’ Bishi UF int PB = 2x CLtbY i edabce™he perimeler of recleryle sep, out pat | PY maint Levitt {hd beadhion = int benmeley 9)’ Denker a (eg s ar jetdotas! Vpenmeter of redonate *$ 20 4: BishatQ, vehano, Convert nc fore usmg Glass G& ohy. > Hivdude Liostreo? Uushg namespace std) class convert € float no,ic} Public’ vod getdatac); vod arsplay Oo; eldalao’e void convert 3 J Coutec “Enter anepall Pt parsgitLendt, cin Pn; i G5: display ec: void conve) 1S io2 (no hos ts 2LILY sat cov Co" indian Pasa 4 nb mainv§g Cea “convert bishaty paisa 1s 12 bishal.getdatal, brshal: Aisplaq.) gelurno; 3 oszqyes Snekhxe > enc8us Stren Ss a ee stss* > ozeh ee 2h Ss ¢ fo unrgek <7 Lin) daa, Ud “ejgndutjab: Ul Zug uqeg77711 dg inw Pereyra 1S go 2aqed “angqu2yaine US Jagan agnedginy SH | Kaydop @ ager 7 UE ie ie g G Lape IP 1H IP 0 1p 77! PP WH 7ZG 22 jhe? | acres ere WEE TS 194) og - 1D {PROLIF UIPu age vegas inl, 77 HT “ «? Tahmdsp PIA ps q CU CR WD | Cuiey 2b vegalidgimw 3H! Liyceye BR Ogre 17 4 wBUS ,, 27 71207 JoOpadeerpab pron fu jes ‘Wand J vagnryclynut $319 CRS 2ntssumu Rush Curmapse)? PPro tb Gi base 21qrl vegonidgime Braces Z fo maa (aay? 3 Kcoranpi78 8 cg 1242 WaN3 PPC SC ry 3 ¢ 4 6 Pua 17,,PPO S1,) 72 77 OP? dasa ’ g \FPUPIZ, BAB Vs) PU 77 FD pecstyuy J! 200 Bay? PON ; ¢ UY ChHo CO Pa 27 ¢, MP quins 9 4993; 27 ne Samp yeB Pien > cu &% Wand 3 p2youeng Ppa SSiap 2 TRS Oudsaumu hus Clu 3 SQI2 OPN) He PRE) aamegsy p2lve puo ssmp buysn FPP Le vane Leypose) Pay? es € @ 1Q. 59 warqad Couey pr2demraP -d - Cd usagzizd a lrynry 7ut 4 | g J PLB DZ FO? G 419 27 £77 4D SOHO EAPC ref gui) aot E(-- 5 cel 6s2 6 yg 1a SOMA INSCIOLP PION i? s19rd ‘2 usr S512) 2 (PRIS e22dsaLunuU fis Cumeysas 2 OPI +e 2PE? 22»nGs| € 210999d O.. re @ | EEE ee ——=— 9 iC) Di (wo SE Pwo sZ S1Qune pul fo wee get 7? tans pe wns rT 4| four Zapata y (BUF) FP? 27 GW) wan go ers 27 9n07 CyPua 27 (2s pra 7741 (WOR I>* pun SZ pore nSs) 77 970 Mppuar7 Bt) PPO77 ,,;CIWT © pr B f@ 0S 27 9NO2 Dou 7uy & Arqro wigak 29919 MM "oO aW) FRO FUL & Gro Uengar DG70Af 9 9701) PPD 97 olf (qt 0 ummar & 19 94 2 FID Pp? gu) % é (PIS Coedseunr by Cura gs wisy+) YSOI7 OPI gp Aarpooo tao wogoum 1 wioherd +42 usraP Ss 18 ie -Sl2 hat. ad hg? Kiara FH pee yr OP!SUL} G Z yd OY Be geuhBue 2a ss cen’ arya gen sid Isirrp karen 277/01 fgyar apisve US SH NPA hVO wuapog r 1o unr ab) Sypua27 B27 2h arianaper Cgnaz Lapel 77 gneD (ky apeia 1a fo hI Cpj19 27 B27 We bb 1 a9 vaeggowhgne? BYIG)2 7779 ne7 Appia 27 0 Pua 77 677 Ve canjankgiag «fA 72,9 70? 4 (9 arven bE HP CF PBR IZ H7Z,= He" amonlqye 229 77 WO? Csch (set 4 Rowe I! 6 ; S Spa 7249724 | ueegnurg -arvardgay fi opisur,, 77 4Ne? folvqeq SGP ID 27 4 afoybguar Pion o 4, a oy! OPVO 27D PP (217 agg eninabgiie PRISUT 27 9no7 folro= vo C2 IND Bmr2N Sauer Pion Pas Bo~dsauou Casal ‘Cuma 4502 OPMIU! FF} (@Pe2 22»n@e5) Dove “far 04 ma> eee Bren fq 102 Sxgng uaseH iP uf ddrou dy WAP in cep PY nesting of rember Finches a eee Clostrens> SUG ramespuce st! class Student fc Mt n2cales 1 Notre 52} Int tobelmenrks ($ 4 VebAn pretrles 2 +rvenes2; Public & Votd Mput oe cout le “Snltv Metles xf hoe subjects 1 on >> prchisit Doak s 2; 3 Volt osplayjetel OF It boted = btalnurks CL fl natry frm ter ove Le ‘rola riches 2 £0 tobel le Old} y¥ by Me rtainc) rh _ 5 oe rz S- (nputC) Snter mares ek? sl is. displayTotaA0)} Tote newhtes 292 ven % Brae. a reas a Co UArg ab Angra hid 31P e wd apd 10 20926 Cgsp = wg Caged & quap oF 48 €9 v9 PAS Acqua mM oC = 2 wi POY PP WP? Louw, 77 pea? 12} hud OP Zappa 17 260 Cpu 22 PMT? PICA W 6 abe Cé 2 1 tab 127 COIN PUsn C&P FT eovenrt 27S yy 2 gy foQorzgray ab’ pyea 9 bio, gu y ~, (awd De 5 found LS POPS FS) L Vrs) CummpsoJP PP) a ad sx (qe teoepesy i tainea) Mes VD ey I jo ¢ tt un) PI Darn \ | & ) ots rgnaId! ZIM cog 44Us Ji soue2s Oo PUNZG napa ay ys0d-Ree2 9) awiy//| g foumper Sn taaqunv ne ALQINIGE PIN) 77 Bre) Beeuce wa Le puar7 (h%«) Lyhepinted 77 CL Seequuru eoP 1293 5, 23 hu pun ve Roun ui c (ax LUmah 22m 2 aug Kidginue 4uy 2 rut “Pas sondsewdu Gwish <11395072 P PHIW FE CRT BITes ya aig? Ung Puls *G tevrbosd ++I rier? BW ppuez2abya 77 6 oct hit 74s! Pwo \e pweprgs © 2ab) Ucounun + aud LD puepys. AB IMLISVOZ 7 gdeque2 abu, 27 QU I7° ¢ (oe mia’ Cp bay dssP TF ZUNiZ puepraS sn 77 31707 0 Bad P VS c 27 pn? OWN | T PLaPIAF 9 (es! 49) CS FusPys 7 LS 7 uepys’ & - 2wian, 27 F777 Zokadyp Pion & (n> bo 2ounu weg) 9uaP aS c J(2 pl 4 fo z aby 0 umaugun ,, 22 migU 202 gua AF i? yand au wigs + Bred S9veprys Ss Sm)? (pes e22dsoumu fe, fal oun € M1845) 7 OPN )IUISE L29InHgSUuGP? PePalsard ZF yp Scroys pag. Jd dtig? 2Oumr 2h b { : Lah a 4d ye Pv I Pena 72g Sae assur ceys 2PISUP Sap 90 4aig Ady} AHH “pant © 4 G71I4D EU OD ae si Jo viargan Ra acnrobord yo PrBs, 27 09 Brag nuvane G : 24a It poyng weprg se’ © ray elas ge ve seks jin wesgig porno H “eo ens “P Z 2uay paying £1 2agirge ue? [1° P mee | were Pour Ww © E~ aPuaIZ Lagouyy 0704S PPyS UL), 77 NCP i Rae aces PION g Copue 27 (Penn 49927 S2 Cy, 27977? J0.0 wa G ~@ PUB IP qi Paya? 4EFPMAZSUEI y) 77 7POP $$ QeQnwac {2s4rd Jo maB $5192 ‘Pas Pondsewunu hiysy F17S2y Acsepaode ~FPUII 13 n27 WOO .capreade Swun)] tu = pnsal 10 Gd 51 “F-1P 52L 4,407m9d0 +S yg 12f 427 97 aagneade Fads // utlus RISA Qirmen? CSTW (e174 agin Aca ra 74 tA & Zz enyjoay,) 77797 2CDRmd=1p PION a (rPu227 2njon 7 (divag usngeh Leanjon- = enjaon-dwH (iH 52qur[V eptedo Gomurq }/ 10 - 19r0d? APqunfy € fda way Ph Lanyon -MGO + enien = een dwar Sdwap reqrunyy cpaade Find] 30% equa) + 192BdIP qury & Sn carnnan 2(0=7 9H) 4oquuny songqnd fanjea yu 1 292d Sroqueny s S12 “PAS 22%dsau0u Swen

You might also like