You are on page 1of 24
| = nefour d. fa figne commentaires equivolent a en python Ct fe best.c fest — pylon Fey [| as : : indi) { gee a S HM - Wenld. ecbuuclion j aa Fickien 6 cempil b++ equinout do i=h-d ited ink i; equivaak d isink om python for(int vigms ist) pee for i im range (me) + Aiwksd tk indi sr ink <0 tik 640; oie eh a aot tn ligne WRE igm: while (<=) f + accolodss, point vagal en fin a Findchion S2S+i (eqnivata { $= s+; iandsd died; iuban 6 5 olin & 5 3 fio (ecpnession A expression 2; expescion3){ | if (expression) { instuchions 5 if (cupnession) } inductions ; Jobe f exprestiond i inibiobicodion tasouction ; white (onpression){n condition \ inshuchions 3 expression; imcrdment dhe { } (comma i++ (Cquiuad é iz isa) if (cxpeessin) { instuuchions i j eel DécPanakion eb inibalisahion pewent dhe gnoupeds floak azo,b+4, C23 j Rod opeateun ere (#) comme en pyton Em Cit faut ob ement dédonen fee viniables LA ooh differnt de°a" om langage C on‘ ch" définzcent deme tng diffs Ce Pet i be 4 » 0” af une Reine de cracdan (domme " Hee Wentd |m') Pos da ype boitesm on C. Om ulibise. b type enkin ane, O= Faucet touk Qe neste = Vr Aesfondeens : Les Glemmnls defini Sond: 4. legge def ualeus danetour (void sialon n'est nelowné ) a. fe mom de ba. fondion 3 es angumant évonleles are. fon ge be be corpo dol forcion (oaks accolodes) # indade havailler ove. Ca gution dynamin de la. mémoit 4 indade, associé 6 fa bibliolkéqas malkenabiqus standard enC , ; Genction di puissance ('pow') , expo "exp') , de fonchions loguittmiqw (‘fog '' log), bigs) Amd | && ped Ip. Roodnotes Exencice. 4: Question 4+ # incads tak sunflce. (ink @, int L) { [+ temic 0 suafoce du nectamgle »/ relum €* 1; Obie a: ink main () § asset (suface (4,4) 4); sent (sufoce (2 ,u) +28) i asset (suface (5,3) 45); tebnn 0 5 t Exencice 2 * Question 4° # inchsde ¢ stdio.2> Blak ett: (float €, int L) f [+ renwoie. & maflipticakon des deux volluts +/ tebuam €7L ; 5 Question 2: nk main ( ) { tak opd 5 fled ors: opt = 3; op +97) Nes 5 pes = mati (op2,cp4) j ° pif ("2d YIP = Mafln”, opt sop? res) 7 nelavn 0. Exencice 3 + Gresian 4: “yao (ink a, int b, iat of ber f pea; Joeet pebi 3 f (prod QP; det Qec; 5 netum @ 5 Question 2: # indleds case R> ink main (){ asseat (plisGaand (4, 2,3) =+ 3); assed ( plusGnand (8,643) «+ 8)/ asst (plus Goandl (4, 40,3) + 40), nelunvm 0; ran 3: ples Gaand (plasand (a,b,c) die) 3 Exencice 4 + Question 4: ink signeSemume (int a. int b) { int 55 asbPO asb ink enn () { assadk(signeSomm (2, -4) == 4); assent (sige Sorme (=, -3) == -4) 7 assert (signs Somm (-2, 2) #10); aclayn 0; i Exencice 5: Question 4 Hook prire place (inka, int, imt Reane){ Hlaca{ aclu THOLNSAL; if (026 ka (j 2AM) <5) neluvm TMOINS26 5; tf (KR Aw RK) chum TARTIN; if (0<26) raluan TROINSZEWE ; aburnen THORAA L 7 blind: Got main (){ piinlf(" Pine (az %d, je%ds R2% 20) <%2f\m", 40, 2/4.0, pristhce (40,7,8)) neluam 0; j hucents Ggadnotes 3874 623 S40 6.40" 3.40" [LT — hucents Ggadnotes | re oe moanlisse Exencice 6- Boucles em C. Question 4+ ink semme_camnes (vation , int m) { [A renvoie, te somme des camés des entions dans f'iatemalle [m: ai]. bypothise + cam x/ int $205 int i «on hile (igs) { Sassiti; toy netunm 33 3 Question 2 # indade casset.8> jk main (){ assert (seme. cames (4,5) «2 $5)) assed ( somme -comes (2,5) 0 64); assent (seoume . cannes (3.5) «¢ $0); assent (somone. cannes (4,5)=* MA); asso (Somme . comes ($,6) © 48) 5 assed ( semme cannes (2-6) 2+ 86)? swear (semme comes ¢-L40) #2 30)5 asst (Somme comes (0,4)12 30); actin 0; i} Question: ak sermme comes (sink om, tm) { [+ hapelbese som <= m henvoie fa seme des camés des eabions dams C’iateralte fon: m] #/ tak 5205 iis fo (ismricem jhe) Seseine of nelawn 55 3 fesente Ggodnotes Euencice 7: Mombnes. premicns AY- AS » 20% Question 4: ‘wk prermion ( ink om) { [x semucie. 4 si mm est premitn , simon. #/ wid office Nombae Premios (ink mf [+ ofgiche tes menbnes promitnsinfritms ou gout au. panaméha. / vik rman 1 { printf ("Ute des meubnes pmitn <= Zod |", MAX); afpiche Nombues Premiers (MAX) ; nelinm 0; } Question 3: Question 4: tok promin (int ) { Void officheNembres Premios (int amas) { ti i=3; ois ik est paomitn «43 fo (ied i imax ise)f H(ms at iforenin a) (4. promion « 0 ;) cetinm ©; pratt ("%d”, a); } t table ((i eq hucents Ggadnotes Exencice 8: Déemposibien diane semnme en eunas Question 4: void fe Bit Pres (some) (+ hypolhese :semme 0 +/ ink mb-S, mb.2,mb.4; tak sommetnp = somme; mb.$- semme_bap / 5; senmetaps semmetap % 5; mb. 2 « somme. bep/2; Somme.tnp « semmetup-24mb.2 + mb.42 Sowme.tmp Pring (Rd «%d +S emas- toda Reanoss % dsA.earas\m" somme, nbs, mb2., mb); Question 2: Void office Bidbels Pieces Multiple nt-somme) jak obs, mb.2,nb.4 , somme.tap; somme taps senme mb. = somme tmp /5 5 wukile (nbs) <9) f soume.tnp . somme Vip -S4 mb.5; mbt: somme.lnp /2; aabite (mb-2> <0) mb.4 = sommelep - 24 m2 ; printf (% d 2% sS€ 4%da2E «% Ae AE\m", somme .nb5)mb3 ab); mb: ob.2-4; mb.Sz mbS-4; j Esencice %: Nembnes parfaits Question 4: hucents Ggadnotes Exemice 41: calka? (0.t) — nefourme & va fem absdue Ja-b| jdlage : Sek 48 Bn e on Bo Be a? Be pe |e Bes| [Bes Br] [ows mS Exencice 42: gd ey4| e634 ma faction | 2) Se} | | So Bee lea ||o « fg » a >| | |gae Be Lia «| Be o> Bo Be wo Be walpel |B % Be| Ime] Ime @ @ ® ® © Erorcia 43: [2 pena 2 | me (a) pence 2, + panonnt} (aK) |» powan Bhvatec [9 /] 15) vanatoe JO 4| |b 4} YD vs By ve Gv “lp ve | (| [Fa vn vs B® va ® @ ® ® © ay hucents Ggadnotes Exencia Ah! Queshign 2: minis. rwaxizanrn (yal, Srmin , mas); $ ‘01d minirman.masinurn (inal, iat # volonin ints “obAar);{ if (ont < elit) { & wollMin = voll; j if (val »uablMar)f 4 WiMax: al; 4 Ercencita 45+ Question 4+ -vwid peamude (‘nk #0, ink ob) { fab bap i bmp: 40; aac aby Aba bmp: j Guestion 2: wid peamuke.cinaulain (jako, inba b inl <) { permule (0.5): permuls (b.¢); ae lueshion perma eae yi (ka, kb, Re), ea j =x Ggodnotes: fabfiJ + * (tab +‘) Encencce 46 - Affidlags d'un tableaw , échange du contenu de dere. cases Question 4: wrtd offe fab (float fab) uit bute) { wb i; fo ((+0; ictoitte 5c ++)f psig (%-2¢\ 6" tbl) j ; pring ("Ie Question 2: aid otis tab (Plook fabl J.» int baie pink P){ ink ii if (Failte >0){ prinkt (°%.29 |E “, Fabfo]); fo (isd ji + nand() -> refousme um mb eatin ene 0 ot + # inches ¢ staid. y + um membre ablealivie enbu o ek 2 compris (0, 4,2)? 4 inclady ¢ lim. B > pamd()%3e- (max-min +4) # difira N42 _, # dep maw 5, # define Max 20 avid init.alea (imt abl) » ink tacll sink omin, int max )f ak y fF (i204 CC haatte jie ay bob['] = mins rand () % (max mim + 4) 5 3 } tak maim (){ J seand (tia (wuLt)); | officke (tab, a), offidte (tab .N); int lab DW]; {sen print ("Initiak’sakian aftalow :"); | subuon 0; tmbeis oodnote: 5 bobLij: i+ 4) |iwitollea (lab ,M, MUM, MAX); 5 Exeacice £0: Gmplage du membne docunnences diyne vallun dans une choime Question 4: ink compte (chan cain [], chan cn) f tab i-0, opt = 0, while ( cRaune{i] ! ="Vo") { if (Caine [2] = ca) cpt ees] i003} elu cpt ;} woid affiche. occun (car cLaine £1){ ink i20; whike (chaine Gj !="\o") { point (" %e opment % A fais \m", Raum [i], comple (cbaine ,chaine [:}) j isajy } mk main ()f chan caine [] =" bonjour"; afficke .oceun (haute) j netun 0; } Question 2: void ofa ocem (can chanel 1){ ik is0,j 5 whib (choine [2] != "\o'){ jeo; wile ( (jcc) BX (caine [5]! cLaine [47)) { jeu acco ue oppancil od fois|m", chains 7, compte (chains , chaine [:}))j 4 inj } Quesbion 3: nk frequence..max (Son coins 1){ white ( doin [i !="lo'){ mb. max: mb.i; J wank i, mb_i7 mb.i » compte (hams , Ram fi])j | i++) 5 ink mb. mor compte (caine ,chaine [5]): af (mb.ip mb. max) { clinn (max jf tke i (mmsiOjes tomar =i; sak main (if chon chaine [J s" bonjour” 5 officha - occun (Raine ); imax Pequn ce .mak (ain) ; pat “eondanb frequent ot % c\m’, hae [i.me))7 ale ra ae nb vitles Question 1? wid office. distances(ax vith erin dist [ue.viLtes][we.viiies)){ painkg (0 Len) 9) 3 (iso jd (NOUIILES ; iea)f pointy ("de vids C12); puintf("\af facie 0; ( (MOLES j i++) paialf (thd \E*) we 21); 30) Jkd i jel b paint ("dle det ITD)/5 pein ("=\"] for(i i94y jd MOMIUES ; joe) wats od \t' distill) 5 pate “fy Question 2: ik asp (ik tit cl wlbs J wh dat Ensues} is wh (ic A. VIWLES) &2 (vill G1!= taut) { ie ines (jedi oy j (WBNS » jee) af (CSE LSIE] do) X (dist LOL] +00 . donc Ynf A. esi on fine qeA on vik que os Hy et bend vas? Cosque p fond nse 10 .Oonc Suph 4. me soul 05 able @) Soit fs R>IR oes pou tout y clanglB , ib erciste ¢ € 12, bel ferey de il exide falc tan 96 IR *T Execice. A\Bs {mers mw EB}. fen nfs ¢6} = ANB Dishibubivité = Lo distibuhivlé de P'union (U) por nappa & Linkeaseckion (1) est géméwloment nepnézentes pan be bi Au(enc). (AUB) (auc). Lois de De Mergam = + La pramiine Loi de De Morgan concorme fa. mégalion de Liumion ok de Cin bensection men (Au6) < (mom A) A(mend) men (ANG) = (rena) U (ton B) (L) Moron que ANB C ANC ot AVE AUC viphiqu BCC. BCC done mEB du EC BIC dc mebemde Premens rx. €@. Sok EA dome me € (ANB) C(ANC) ainsi rE C. Sit m EM et suppesons pon absunde ge mC. Oma oles me ANC. AUC C AUB ANB of donc %¢B, cohadichion . Dans town tes cas onabien mE C, ainsi BCC. () ABB:= (416) Ula) ALB» ANBC> A+B ao Gna) u(Kne) $i AxO=f, Pet din que A06: Hh . 5: ADB: ANB, = Bua) (Aus) comme #8 CAND = (AvB)\ (Ane) (4) 408 . (418) u(BvA) = (BARU eas) 2 (BUA) A (fuB = (AUB\\ @NB) = ADB shscents Ggodnotes njeclve + tout Element de son ensemble d awnvéa a an plas un ankecédent pan fo Sunjachive : tout ¢4inual ce. t‘onsemble damivée acu meims um ant cca Exenaie 7: W) Supposens gan goPny =qofla) ia a{fies)- = (f(a) pan injecvké de g Quays (Gey ob pan inpshilé af rrey2%y donc get {ot inp (b) Si 2€G,if exishe yEF bel que g(y)=2 pon sujedtilé de g , puis exisle CE baw P(mdey, par sunpcliilé deg. . Rinsi g 0 find 22 ©) Si {ene (w. on applique ga 6 gu. gen ge fle) of ainsi x + 4 pan imjachivilé deg of Capplicakon q mest imjachive om géminal tn Goodnotes Gaiabe 4: 2022 Exonice 4: (0) 5 Before} IR, pon font yentne Pe) ot /) »iPeaste cE [ait]. lePqu ferey. &) 7W270,9 Po. ¥meIR ,|m-a|

|fo-Bl ¢ & + Anam, EIR, readreg & floes) ¢ fle) ©) A vest pan ma fae A) Pour touk m EN , fegons Mas (A+ ianctan(a) )”) desole que [ste] = | 4siondanea)”| etblAscancament On pon continutt de & » quand m——» +00, Fa | Ar anctom (m)| = [Tafedan ay” —s (47 (Ey >0 donc m bn | 4+ acrkam (nm | —> +00 donc cote suite est divegpale be foro . seer (4) 4 goa: EN ofLy Cre Ga— men(ty 0 ef gi). 0 donc gest dirivable en 0 ; unt got 8 produit ch durc frcle- dich doc g. ect dairdle on R*. Glu) » @now(Z) +4 4,04 ain (2) 2 Toccon(2} nn) Comrce get de dase Crunk’, Ce fron gy ast cokinus Poor m CW, + POON teas A. Ales quand M—¥0 Xp 0 ope. as gh dnc 4 chant iz (0) Supposens & dew'vabes . Alos om pubrculia , Rest continue om © , donc a tals 1 equi dome bt. Ae Ak awni que & diivée , &.gudls en 0 doit the aie & divnbilite d gauche 0, ce qu domme -a2-4 past, iphoquumon , ona. chatsit axbe 4, te fondion R est bien dusivab® su 4,4) , tasdo Exmnaice 2: () D,, est donee pan 4. Dlapnés Ce Méntine de BXyane weinshass , took suite bames ode ou two sale Shes converguate. CA) om a wey > 1 donc OC my-4 Ling C rey La fonchiom fx. —> nin (On(~)) est dnivabh well doe Ftylit decuatanal goal: fonts A conor) |feew- Fied| Cee): a * On Od my my re Wink |geahe ene | ¢ + (‘ea foal

You might also like