lecture_notes_17 - " f'-~ '---/ .../ '-,- '-,J\...

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

View Full Document Right Arrow Icon
("\ o - - - .- '-- , - - - .:s $, --.~ oi;I G ~ -+ n ~r ~ ..., ::. ../ :/ . . (3 --- - ,$;' --t -- -- - -- ;L 0 ..., - <. ' (\ c - ' A::::> +-1 c:. . t ;:. i+ . ..:s 2 -+ h
Background image of page 1

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

View Full DocumentRight Arrow Icon
8 - - - - - - - - - (\ ---
Background image of page 2
- ----- - --- -- --- /* ECE 190 .Spring 2008 */ /* Example of a program wi~h a func~ion */ 'include <s~dio.h> in~ isI~Prime(in~ number); /* Declara~ion */ ~ in~ main ( ) { in~ iDHumber = 0; in~ prime = 0; prin~f("Inpu~ a number: "); scanf("%d", &iDHumber); prime = isI~Prime(iDHumber); .. /* Punc~ion Call */ if (prime) prin~f("I~ is a prime number.\n"); else prin~f("I~ is no~ prime.\n"); } /* Punc~ion Defini~~on */ his func~ion re~urns a 1 if prime, 0 o~herwise */ in~ isI~Prime(in~ number)~ in~ fac~or; for (fac~or = 2; fac~or < number; fac~or++) { if «number % fac~or) == 0) re~urn 0; } re~urn 1; } (0 .
Background image of page 3

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

View Full DocumentRight Arrow Icon
W N -- ~ - c. " ,~ . - c ,~ ~'l cr- t' f'ia ~ - ~ f\ o . ---. --- -- ----
Background image of page 4
- ~ ~ ~ -+ 0 9 ~ - (c;)
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: " f'-~ '---/ .../ '-,- '-,J\ ,:$---+---N-. '\---\/'J-'\,.J'J ..N' :;' :::>. ,-r .....-\--\? (J " 9 1, () .-\-c.. ..... 4-(' .., c. :> f ..., f". :> ..-. .-_r ,.-.-+ ""'" f'J (' c:rO X "----........... . A ('\ J r '- . .., 5---1 1. I ~ r ..J ,~ 1'--- --.. I ' oa () ,. ,. ,. . " (' ".--"1 , r l (1-() ..,--, i (' ;to r--+ J , I J J , \ ( S ( \ \' 1 I ~, I ( ( . \ ( ,-J '\ ( ( ~ r ( " ( . · f'J I VJ '" I 1\ ( ... I I ~ \ I--, I---. :::J __I .,1'\ () p---.----~. L.J>--.--,-' '2 r n V' ., (}d p t" ,.--r--,. VJ-' $ G)----...
View Full Document

This note was uploaded on 02/21/2011 for the course MATH 243 taught by Professor Gao during the Spring '08 term at University of Illinois, Urbana Champaign.

Page1 / 12

lecture_notes_17 - " f'-~ '---/ .../ '-,- '-,J\...

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