lecture_14 - T f I x M w aQ/bs> Var/M108(91414 meng...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: /'\ / T f I x M. w. aQ/bs ' ' ' -> Var/M108 (91414 meng Q/éedfibu o7[V4"I31(Z!4 ‘5‘ Opera? ¥9r$ —-9 C014 (1/4/01!le 6051570“! 7[S *9 Vambfle Jet/ardvl/ow : 6.87 l’h-fl cam/21431”); I. Ideu‘lt’-ffi&r{gl3wgalla Mam 7, EP6 ( I'u-l, MW, Jaw/fie) 3, Scaké’ [mall dwarf) ~wlwre 7% wr/afle 1's Z’M Q, Salome“ alas fs/m‘m Que! duvla/meeylxéj '9 gap/9e ~> lauM- accegsr'fle “0%ng a M («n/Awe 1% {'9 Je+,'m *7 «doe/99m fillwaufflauql’ Me 6—7 M (’5. C 1’; a swfiseLsz‘ou 0+ 4 finawa €6¥Wm 0133M gram? damn/er { «ad ad’s/Ma; émw Vanuatsz 7" dellfi4s'ou§ 041%? J‘ll/‘ée. £19315. (1414! a». modi tars 06¢ M4 M glob}; "Qt-L jibe #1.? unfit/(bk (961 gig flue {1511/ ->' slme/m‘ '—- me we WW ’7! 15%; flaajfli 6—? Wot/{(9 0110) who: Wuhéerigflj 1§/7Z Sil/xfif-fi Saw Adm +5peg vans/3nd ('41,! —— a” aw dual #0 F-éPfoLg Mani/12681.44fo Mum/4V3 e. 3, .{pr /6~ 13/0: ' uS‘ I -7 I‘D!ny 1 —_— 2”... —§ .12 ~} . (‘61.! 3 OH-“IZIG'TI I 1 11' I ,1 V A I4. F 2. 9 Cwasylawg ‘ .9 can 5? Jae [owl @4243 cows 74%»: q/um/I'VZIW —-> W Mae/ace 0} flu? var/2:612. Jae; W My dqrz’z/zj Moe exeem‘r‘au 04L M [bmymem *7 Saga/“42% a/aSS ~> $741741 marl/7412K cam & azc/oéa/ .49 mac/Ca Wragé A; Mala/z: (SZS Me/ae 44mm“ (buawé’ouS _ ~7 l¥ $145046: ('9 Qfierjgfltecf/ dwv/oméé cams (’3 (exam; amlorme 19L Mew/M10; [oi-e flue/r x/elwes WW flar‘ré £503 #rIn/ZmZe/S, v fie/54W (MI/twig M: cf 534M}. SAMLE $5283. ‘9 fll/an/M s cede r~ yank/g [0&1 Sew-941m (k wA/w’e a a! V‘W’z'a/glog 0+ #4 Svlwuéé, P ‘ Signage alas are c242wa M41 VW—fll'me. slack 1'; w/wrze Aw veer/dies (9% W flaleW’(“l' Home @5293) We «Ham #4. “ ‘ ~€WW3 fmem z'ul/aw‘l/am [10S at r42er 6‘11 44!! ha" {fate I I , slack, cal/e4 63%} W” 2M ¥ ~1‘L. My L2 cashew/4» 4W mmv‘g/ wards, (Wink/[W War/ea (2 but“, Mall/WP, 43K] gladly ehgg/ gwdge AW}? {4” “W Udm'wle, -) 5x V'W‘ M1 5 ~> WWW/“49%: caM/M/Um of Viewng Ml fi‘lwds w% opmelarc; e. 63.) I!“ (j , 23" i. 7 $+a¥mw~l : {Frrases 4 «Implequ (MI/i 0J— WWV,‘ e. g../ _ ’29: X»! ‘j; _ . § ~> 3 (Sew/Wk; 4Mm4'udwlez‘é 4g» Sfizlmql, «7 5 3({mceg (My ugeJ ‘ 7l0 .jlarm 42 (10141 , or I _.> {xmépm. V '->{ - o k ‘— s ways! g »——— —_‘ M. .. MEN». _ m... .m..~.‘..m.._.~...._m..v._.v.. ._.___._.__. _ ..__ .1 ._._.~....~....~ w i E j i i i . i g All: Ag ——> 1’14“le /c{e-4r«€MMVL gzxff’. /x 3:41 y:_§‘ f/ #Pflg‘l—I’hcr-emwf I _Z:+"t)£‘/ [4; 2-»6 } {:4 x/ —/3r‘-e—IZrcI"-€me«/ ‘7 («YdJV-efii'y’hg lav/fl boa/all}? odeLv/S #{xamP/e.’ _ 52x Q2 +3 119~WZ,6)' ~> ayplv‘ua opera”; yreulmcc ruéeg, Ml'g 6mm; (MRBDH/B‘W/ZDJ —»> 772412 17.? owes operdwg Frer/wce game/46!. —-2 7; 6f 3:279, use FQerH'heS-e/s “> 9PeuM opener!” : Ci’MJ/J/bpwé ( z :j Y: ’25, o—l’flewvz'aue V= 2‘. ~> SWWV’ . aéowL (730124714 . ~> 444915113“... “II/[£71 Clo—RS I'vl C/O? , . -> Pr—epegclwce —— I‘M WhIW prier are 0W¢Vl¢7< “‘>LCQSV$0CE¢'(&‘ZI‘VI¥'3—-lll/\ WW‘M' owe/ex wngm ' ' 5 , g .oql gm-e'Preudelnoe: 4/11. p. ~7 Caucé'la‘ma/ was 21rqu ? .‘9 {Inf—£4 progrd wmfitg; ems hunk: -9 M1 seq/aw MK c0679“!- -Ziflwgfliiszg&fifl%;W ~> cierce-lzbm Cflh§7llfl€£€w£ —? Maul/0M c4415erde c‘wfiZWA/Z‘I’“ ’2' 4/’3 cessmgg [Maya/(8,2, ; WW/f am $84757 """"" n 75 R--- % Teas )' SorgvzazSK Z J H P 40% TRuE 5$a5¢¢$K / clam ‘ magi flawsto‘L I a ('4. (Loud/11W ((3 4mm, £14 at 31/014 /’g_’ #9» ##M *' [y 4: m) /~9/'M,5/e §7Z1JWVL ’ ' 1'71 (x >= f) $(Qz_é(4=2f>{ - ,3:¥*X+€; _ _ 7, “WWW/“(vi I E‘,:{7fi_“5>/é} : . 5°14”; V i a 562+ «wake/Md f ' ach'aw'/ j 4/9 P437 can J'Jlfm Wrapje M97. TfiuE BK--- 5aa+faw WUTJKHE 3 WK‘)‘ capom )[I'ol/j cad/m, WM _ 71w [9? i ; Wale. cmaé’J/afl T ,qu/l/W '1 89-.., ELSE \/—{ M99974 WW 7"”? § H ER Vw/VE I / 3W” 2 ELSE “realm when fudge +a198 _ - - - WIVE UFV'inQ‘vk “‘7: a$$o €434 21(th as W/(% €1.55}; “at f 1/ [710) § 7'7L NW‘ ~£355/2; ([9? 1.1" m aka 1%; assoc/“41 wzfl $=2<+2) Hue ¢{o%—?— Lat; \u‘l‘WWcfi/fi I"; [Y.’=10){ (’7‘ (W’é) _ 192V?) - e196 2216+?) 3 ~7 «(J W! red/[lb Wu:th >10 6959492444 e/ge' IM‘M +”"9‘/' ’(7[/ W W4” SA”“/°/C(K{K:§ 2"}. L{y!:w>{ ' . . ‘ 6+ (3>5) _ ‘ ‘55:?2‘ _ - 3 ‘ / 2 r 619.2 3:231» ’2} I: ‘y ,U/ ' " ("~‘2 ~ ' , ‘ . .." . 3 ; V _ * 7t “31’” “59"‘5‘4W‘L awwv- \WW owl 5: = § #19. RIO S? 4242’» [a : SOZqJ/‘oh la Ha ulna/(L e maul/m, 9: 267+ 62:“ =0 ‘Q; 61“!“‘3 _€ _ (7[ 9:0: :3”; __ng§ 6/5: U} %)a: )9, = else : Lw ra/ raiser/$1, /* solution of the quadratic equation axA2+bx+c=0 */ #include <stdio.h> #include <math.h> /* needef for printf and scanf */ /* needed for sqrtf */ main() { float a, b, c; /* quadratic equation coefficients */ float D; /* determinant */ float x1, x2; /* solution(s) */ /* get equation coefficients */ printf("Enter a, b, and c: ")3 scanf("%f %f %f", &a, &b, &c)3 printf("Solving equation %fx“2+%fx+%f=6\n", a, b, c); /* compute solution */ D = b * b - 4 * a * c; /* compute determinant */ if (D > a) { /* two real roots exist */ x1 x2 (-b + sqrtf(D)) / (2 * a); (-b - Sthf(D)) / (2 * a); } else if (D == 0) /* only one root exists */ x1 = -b / (2 * a); /* print results */ if (D > o) printf("x1=%f, x2=%f\n", x1, x2); else if (D == 9) printf("x=%f\n“, x1); else printf("No real roots exist\n"); $ls quadratic.c S gcc quadratic.c -lm -o quadratic Sis quadratic quadratic.c $ quadratic Enter a, b, and c: 1 2 -8 Solving equation 1.000000x"2+2.000000x+-8.000000=0 x1=2.000000, x2=-4.000000 $ ./quadratic Enter a, b, and c: 1 -10 25 Solving equation 1.000000xA2+-10.000000x+25.OOOOOO=O x=5.000000 S ./quadratic Enter a, b, and c: 5 -2 2 Solving equation 5.000000x"2+-2.000000x+2.000000=0 No real roots exist $ ...
View Full Document

This note was uploaded on 08/29/2011 for the course ECE 265 taught by Professor Kosbar during the Fall '09 term at Missouri S&T.

Page1 / 12

lecture_14 - T f I x M w aQ/bs> Var/M108(91414 meng...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online