Microsoft Word - 文件1

Size: px
Start display at page:

Download "Microsoft Word - 文件1"

Transcription

1 1. TimeTable.c ( 時間表 ) 時間 A B C D E F :30-09:05 中文 英文 數學 電腦 物理 生物 2 09:05-09: :00-10:35 化學 中史 世史 地理 美術 體育 4 10:35-11: :25-12:00 音樂 家政 宗教 經濟 通識 會計 6 12:00-12: :00-02:35 週會 :35-03:10 週會 ASCII Art 1 2. ascii-art.c ( 利用 printf("..."); 輸出以下圖案 ) 如何正確輸出特別字符 % " \ int x = 10; printf("x = %i \n", x); 試試看 : printf(" 試試看 :%% \t \\ \r \" \n"); ASCII Art 2

2 _." `. 3.--(%)(##)---/#\ /###\ 5 :, ##### 6 `-...-" _.-\###/ 7 `;_: `"" 8.""""""`. 9 /,,\ 0 // Snoopy \\ 1 ` " 2 ---`.."--- 3 ( ) 1 \%/ 2 ="0"= 3 1 o 2 o 3 ]%% _n_n ][ 4_ )< 5 "OO OOOO-" OO\\_ 2 /%\_ 3 4 / \ 5 " " ASCII Art 3 1 -% /^^[ / ^ # // 5 ( / 6 == " \ 7 ~ /\ /\ 2 >% %< 3 " 4 v 1 o 2 / \ 3 /-\=/-\ 4 % ASCII Art 4

3 F.4 ICT C Programming (L3) 參考 :C-revision-f3.ppt name gender class no yy dd,mm idno wt ht addr phone 姓名 : 性別 : 班別 : 號數 : YOB : dd-mm: ID # : 電郵 : 體重 kg : 身高 m : 地址 : 電話 : 陳大文 M 4A A chantm@hotmail.com Apleichau Name : 陳大文 Class :4A (01) DOB : Age :16 BMI :22.4 Wt :110.5 lb Ht :6 ft 12 in 1 kg = 2.2 lb 1 m = 3.3 ft 變數 問題 輸入 scanf/gets 1 #include <stdio.h> char name[20]; // 宣告姓名 ( 文字 ) char sex; // 宣告性別 ( 單字 M/F) int age; // 宣告年齡 ( 整數 ) float wt; // 宣告體重 ( 小數 ) main(){ printf(" 姓名 :"); gets(name); fflush(stdin); printf(" 性別 :"); scanf("%c", &sex); printf(" 年齡 :"); scanf("%i", &age); printf(" 體重 :"); scanf("%f", &wt); // 輸入文字 // 輸入單字 // 輸入整數 // 輸入小數 scanf/gets printf(" 姓名 :%s\n", name); printf(" 性別 :%c\n", sex); printf(" 年齡 :%i\n", age); printf(" 體重 :%f\n", wt); // 輸出文字 // 輸出單字 // 輸出整數 // 輸出小數 2

4 1 2 宣告 int x; float x; scanf() 輸入 scanf("%i",&x); scanf("%f",&x); scanf() 輸入 printf() 輸出 printf("number = %i \n", x); printf("%f", x); get?() fget?() 3 char x; fflush(stdin); scanf("%c",&x); fscanf(stdin,"%c",&x); x=getc(stdin); x=getchar(); x=getche(); x=getch(); x=fgetc(stdin); x=fgetchar(); char x[10]; scanf("%s",x); fscanf(stdin,"%s",x); gets(x); fgets(x,sizeof(x),stdin); printf() 輸出 put?() fput?() 5 char x; printf("%c",x); fprintf(stdout,"%c",x); putc(x,stdout); putch(x); putchar(x); fputc(x,stdout); char x[10]; printf("%s",x); fprintf(stdout,"%s",x); puts(x); fputs(x,stdout); scanf/gets #include <stdio.h> main(){ scanf/gets int no,yy,dd,mm; float wt,ht; char name[10],gender,class[3], idno[10], [20],addr[20],phone[10]; printf(" 姓名 :"); printf(" 性別 :"); printf(" 班別 :"); printf(" 號數 :"); printf("yob :"); printf("dd-mm:"); printf("id # :"); printf(" 電郵 :"); printf(" 體重 kg :"); printf(" 身高 m :"); printf(" 地址 :"); printf(" 電話 :"); gets(name); scanf("%c", &gender); gets(class); scanf("%i", &no); scanf("%i", &yy); scanf("%i-%i", &dd, &mm); gets(idno); gets( ); scanf("%f", &wt); scanf("%f", &ht); gets(addr); gets(phone); 3 4

5 參考 :console.ppt & dow2009.ppt 利用 gotoxy, setrgb 重寫程式 : 一次過出現所有問題, 再逐一輸入 例 : #include "console.c" 功課 : Name: Chan Gender: m YOB: 1990 setrgb(1); printf(" 班 "); setrgb(4); printf(" 別 : "); gotoxy(15,0); gets(name); gotoxy(15,2); gets(class); A: Chan is a 19-year-old boy. 其他練習 : 心臟病機會 scanf/gets 5

6 Story-telling 故事一則 Q: 姓名 name: 陳大文 年齡 Age: 16 身高 ht(m): 1.7 體重 wt(kg): 60 朋友 friend: 陳七 喜歡顏色 : 紅 變數 : int, float, char name age ht wt friend color 陳大文是個樵夫, 一天他走到森林, 忽然遇到一條身長 1.7 米的噩魚, 牠的名字叫做陳七, 張口要把陳大文吃掉, 剛巧獵人經過, 噩魚陳七, 身中 16 槍, 即時倒地 1 Q: 全班人數? 40 男生人數? 24 A: 女生人數 = 16 Q: 西瓜總數? 50 吃去多少? 20 A: 餘下西瓜 30 個 Q: 橙每個價錢? 5 小明買了? 20 A: 應付款 $100 Guessing game: Cuboid 長方體 Q: L 長 = 3, W 闊 = 4, H 高 = 5 Area =? Volume =? Total Surface Area =? 2

7 輸出句子 printf (adv) 1. printf ("%d \n", 123); 2. printf ("%+d \n", 123); 3. printf ("%+d \n", -123); 4. printf ("% d \n", 123); 5. printf ("% d \n", -123); 輸出? printf ("%f \n", 123.4); 7. printf ("%.f \n", 123.4); 8. printf ("%.1f \n", 123.4); 9. printf ("%8.2f\n", 123.4); printf (adv) 1 輸出? 11. printf("%d\n", 205); 12. printf("%d\n", 2+3); 13. printf("%f\n", 2+3); printf("%f\n", 205.0); 15. printf("%f\n", 2.05e2); 16. printf("%f\n", 1.15e-3); 17. printf("%d\n", 7/3); 18. printf("%f\n", 7/3); 19. printf("%d\n", 7.0/3); 20. printf("%f\n", 7.0/3); printf (adv) 2

8 輸出? 21. printf("%d\n", 7%3); 22. printf("%d\n", 10); 23. printf("%d\n", 010); 24. printf("%d\n", 0x10); printf("\041\n"); 26. printf("\x41\n"); 27. printf("\0 \n");! A 8 進制 16 進制 28. printf("%o\n", 20); 29. printf("%x\n", 20); 進制 (%o) 16 進制 (%x) printf (adv) 3 語言控制字元表 : 字元 \a 8 進位 \ 進位 \x07 功能敘述發出一聲嗶的聲音 beep \b \010 \x08 退位 backspace \f \014 \x0c 跳頁 form-feed \n \012 \x0a 換行 new-line \r \015 \x0d 無換行的歸位 return \t \011 \x09 Tab 定位 ( 水平 ) \v \013 \x0b Tab 定位 ( 垂直 ) \\ \134 \x5c 印出反斜線 \ 字元 \' \047 \x27 印出單引號 ' 字元 \" \042 \x22 印出雙引號 " 字元 printf (adv) 4

9 輸出? 1. printf("we don't have enough time\n"); 2. printf("everybody say" " \"Later is better than never\"\n"); We don't have enough time Everybody say "Later is better than never" 3. printf("computer is powerfuk\bl\n"); 4. printf("who can make it\ryou\n"); 5. printf("failure \151\163 the mother " "\x6f\x66 success\n"); Computer is powerful You can make it Failure is the mother of success printf (adv) 5 函數資料轉換型態 % 字元 %i,%d %c %s %f %e %g %o %x 功能敘述輸出十進位的整數輸出字元輸出字串輸出以小數點表示的浮點數輸出以指數表示的浮點數自動選擇以小數點表示或指數表示的浮點數輸出八進位的整數輸出十六進位的整數 printf (adv) 6

10 八進位 十六進位 將十進位的數值轉換成字元 (%c) 八進位 (%o) 十六進位 (%x) 1 #include<stdio.h> 2 main(){ 3 int a = 69; The ASCII Code of 69 is E. The Octal value of 69 is 105. The Hexadecimal value of 69 is printf("the ASCII Code of %i is %c.\n", a, a); 5 printf("the Octal value of %i is %o.\n", a, a); 6 printf("the Hexadecimal value of %i is %x.\n", a, a); 7 printf (adv) 7 顯示資料的欄寬和精確度 語法一 + 靠右 %ni e.g. %6i, %02i 語法二 %-nd e.g. %-6d 前面補 0 - 靠左 printf (adv) 8

11 修飾語 #include<stdio.h> main(){ int a = 1021; printf(" %i \n", a); printf(" %2d \n", a); printf(" %6d \n", a); printf(" %+6d \n", a); printf(" %-6d \n", a); - 靠左 printf (adv) 9 小數點浮點輸出 語法一 %m.nf 共 10 位小數後 1 位 e.g. %10.1f, %.2f 語法二 %-m.nf e.g. %-10.1f 小數後 2 位 - 靠左 + 靠右 printf (adv) 10

12 修飾語變化 #include<stdio.h> main(){ float f; f = ; printf(" %f \n", f); printf(" %2.2f \n", f); printf(" %9.2f \n", f); printf(" %-9.2f \n", f); %f 小數後 6 位 小數後 2 位, 四捨五入 printf (adv) 11 char s[6]="abcde"; printf(" \n"); printf("%10s$ \n", s); printf("%-10s$ \n", s); printf("%*s \n", 8,s); abcde$ abcde $ abcde printf("%*c \n", 2,'x'); printf("%*c \n", 3,'y'); x y printf("%*.*f \n", 10,2, 4.567); printf("%*.*f \n", 10,2, 34.56); printf("%*.*f \n", 10,2, 234.5); printf (adv) 12

13 Exercise 1: 1. printf(" %d \n", 123); 2. printf(" %5d \n", 123); 3. printf(" %-5d \n", 123); 4. printf(" %05d \n", 123); 5. printf(" %+5d \n", 123); printf(" %+5d \n", -123); 6. printf(" % 5d \n", 123); printf(" % 5d \n", -123); printf-quiz 1 Exercise 2: 1. printf(" %f \n", ); 2. printf(" %9f \n", ); 3. printf(" %9.2f \n", ); 4. printf(" %-9.2f \n", ); n %d % d %5d %+5d %-5d printf-quiz 2

14 試寫一句 printf 句子, 顯示以下字句 D:\user\cprog.html../comp%20soc/ 座佑銘 :" 自古成功在嘗試 " printf printf-quiz 3 ICT Quiz 資料 格式 結果 %10d %+d %-10d % d %010d %7.2f %010.3f %+10.4f Exercises: a b a b Q: enter a,b: A: = 300 Q: enter a,b: A: = printf-quiz 4

15 Q: Name: Chris YOB: 1980 Sex: m A: Chris is a 28-year-old man. #include <stdio.h> #include <ctype.h> main (){ name, gender='m' 宣告變數 yob, age, hh printf("q: Name: "); printf("yob: "); printf("sex: "); printf("time: "); 輸入資料 c = toupper (c); Age / Boy / Girl / Man / Woman 1 age 21 <21 Boy Girl 00 time <?? 12 time <?? 18 time <?? Good morning Good afternoon Good evening Admission Fee 2

16 age = printf (" is a??-year-old \n", ); if (age>=21){ else{ if (){ printf ("man\n"); else printf ("...\n"); if (){ printf ("...\n"); else printf ("...\n"); Age / Boy / Girl / Man / Woman 3 printf ("Good "); if (time) printf (" "); else if () printf (" "); else printf (" "); 00 time < time < time < 24 Good morning Good afternoon Good evening if () else printf (" "); printf (" "); Mr. / Ms. printf (); Age / Boy / Girl / Man / Woman 4

17 Modulo Arithmetic: x%y x y 的餘數 商 餘數 10 4 = = = = = 32 10/4 = 2 11/4 = 2 12/4 = 3 13/4 = 3 14/4 = 3 10%4 = 2 11%4 = 3 12%4 = 0 13%4 = 1 14%4 = 2 考考你 : (1) 9/5 =? (2) 9/5.0 =? (3) 2000%400 =? (4) 90%12 =? 0 6 Numbers to Digits / / / % % % 試利用 % 及 / 組合把 4321 分拆為千, 百, 十, 個位 :4,3,2,1 練習 : 1. 要求使用者輸入 n (4 位數字 ) 2. 輸出個別數字 例如 : 輸入 n (4 位數字 ): 千位 = 百位 = 十位 = 個位 = 4321 / % 10 宣告變數 int n, d4, d3, d2, d1; Numbers to Digits 2

18 額外要求 假若使用者輸入少於 4 位數字, 答案 例如 : 輸入 n (4 位數字 ): 試利用 % 及 / 組合把 4321 分拆為千, 百, 十, 個位 :4,3,2,1 千位 = 百位 = 十位 = 個位 = 4321 / % 1000 / % 100 / % / 100 % / 10 % 10 Numbers to Digits 3 功課 :A B & A B 要求使用者輸入兩個 2 位數 (a,b), 例如 : 輸入 a (2 位數字 ): 34 輸入 b (2 位數字 ): 12 橫式 : = 408 直式 : 34 a 12 b c=? d=?? a*b( 十 ) a*b( 個 ) a*b 試把程式改為 : 3 位數 2 位數 3 位數 3 位數 A B 150 / 12 = ) q=a/b 積 product, 商 quotient, 餘 remainder Numbers to Digits 4

19 考考你 : 試利用 % 及 / 組合把 n= 分拆為百萬, 十萬, 萬, 千, 百, 十, 個位 : d? = n /x %y; d? = n %x /y; d7 = 百萬位 = d6 = 十萬位 = d5 = 萬 位 = d4 = 千 位 = d3 = 百 位 = d2 = 十 位 = d1 = 個 位 = d7=n/10 6 ; x=10 5 y=10 x=10 4 y=10 x=10 3 y=10 x=10 2 y=10 x=10 1 y=10 d1=n%10; d7=n/10 6 ; x=10 6 y=10 5 x=10 5 y=10 4 x=10 4 y=10 3 x=10 3 y=10 2 x=10 2 y=10 1 d1=n%10; Numbers to Digits 5 輸出句子 printf (adv) 1. printf ("%d \n", 123); 2. printf ("%+d \n", 123); 3. printf ("%+d \n", -123); 4. printf ("% d \n", 123); 5. printf ("% d \n", -123); 輸出? printf ("%f \n", 123.4); 7. printf ("%.f \n", 123.4); 8. printf ("%.1f \n", 123.4); 9. printf ("%8.2f\n", 123.4); printf (adv) 6

20 輸出? 11. printf("%d\n", 205); 12. printf("%d\n", 2+3); 13. printf("%f\n", 2+3); printf("%f\n", 205.0); 15. printf("%f\n", 2.05e2); 16. printf("%f\n", 1.15e-3); 17. printf("%d\n", 7/3); 18. printf("%f\n", 7/3); 19. printf("%d\n", 7.0/3); 20. printf("%f\n", 7.0/3); printf (adv) 7 char s[6]="abcde"; printf(" \n"); printf("%10s$ \n", s); printf("%-10s$ \n", s); printf("%*s \n", 8,s); abcde$ abcde $ abcde printf("%*c \n", 2,'x'); printf("%*c \n", 3,'y'); x y printf("%*.*f \n", 10,2, 4.567); printf("%*.*f \n", 10,2, 34.56); printf("%*.*f \n", 10,2, 234.5); printf (adv) 8

21 體重指標 BMI = 體重 / 身高 ² Body Mass Index (BMI) = weight / (height) ² 健康狀況 Male 男 Female 女 略瘦 under-weight 正常 normal 略肥 over-weight 過肥 obese 體重 (kg) 55 身高 (m) 1.7 BMI 健康狀況 男 1 略瘦 女 2 正常 輸入 輸出 2. 變數類型? 1. 需要變數多少個? int float wt, ht, bmi, group char float int 體重指標 BMI 1 3. 步驟 1. 宣告變數 wt, ht, bmi, group 2. 要求使用者輸入體重 (wt) 身高 (ht) 3. 計算體重指標 : bmi wt 4. 顯示 bmi 值 5. 計算健康狀況 ( 男 ): group (1-4) 6. 輸出健康狀況 7. 若一切正確, 可按性別 gender 計算健康狀況 bmi 2 ht 體重 (kg) 55 身高 (m) 1.7 BMI 健康狀況男 女 1 略瘦 2 正常 體重指標 BMI 2

22 步驟 1. 宣告變數 wt, ht, bmi, group 3. 計算體重指標 : bmi wt, ht, bmi group bmi = 2. 輸入體重 (wt) 身高(ht) 4. 顯示 bmi 值 printf ("bmi = \n", ); printf (" 體重 (kg) "); scanf ("% ", ); printf (" 身高 (m) "); scanf ("% ", ); 體重指標 BMI 3 5. 計算健康狀況 ( 男 ): group (1-4) if (gender ){ if (bmi ) group=1; BMI 狀況 建議 略瘦 正常 略肥 30 4 過肥 else{ 6. 輸出健康狀況 if (group ) printf(" 略瘦 \n"); if (group ) printf(" 正常 \n"); if (group ) printf(" 略肥 \n"); if (group ) printf(" 過肥 \n"); 7. 若一切正確, 可分開計算男女健康狀況 體重指標 BMI 4

23 CAL / (Flash Action-script) 1. notepad matching.xml cs1xx-maths.xml ( utf8) (5 10, :F.3 ) : 2 ( ) ( ) Opium Cocaine 2. matching.fla ( cs1xx-maths-cyc.fla),, F9( ) myxml.load("maths.xml"); Ctrl-Enter 3. :,,,... ( ) (10 ) 4. : (sun) 12:00 cs1xx-maths-cyc.fla cs1xx-maths-cyc.swf cs1xx-maths-cyc.xml ( ) 5. : Y:\ict-f4\ matching.xml, cs1xx-maths-cyc.xml ( utf8) <?xml version="1.0" encoding="utf-8" standalone="yes"?> <Matching xmlns:xsi=" <Q><Key> </Key><Match>volume</Match> </Q> <Q><Key> </Key><Match>origin</Match> </Q> <Q><Key> </Key><Match>symmetry</Match> </Q> <Q><Key> </Key><Match>reflection</Match> </Q> <Q><Key> </Key><Match>rotation</Match> </Q> </Matching> 5 volume 2

24 2. matching.fla ( cs1xx-maths-cyc.fla),, F9( ) myxml.load("maths.xml"); Ctrl-Enter cs131 4A02 myxml.load("matching.xml"); myxml.load("cs131-eng-llcn.xml"); myxml.load("cs132-hist-lyl.xml"); myxml.load("cs133-math-cyc.xml"); / : (3) (1) + if & bmi (2) printf % d scanf (3) if-ex if-1 if-2 if-3 bmi (4) a/b%c x/y%z ceil/floor (5) array notes array01 array02 for(2) (6) roman money string char-str char-str array rand seq(1) rand seq(2) pair-up (7) strcpy strcpy2 (8) strncpy strncpy2 (9) strcmp file fgets (10) card20 cj-array bubble sort binary search (11) queue queue(c) stack 4

25 hh:mm:ss 15:59:50 1. 需要變數多少個? hh, mm, ss #include <stdio.h> main(){ int hh, mm, ss=50; do{ printf ("...", ss); ss++; 2. 變數類型? int float char clock _sleep(1000); while(1); system ("pause"); 1 hh:mm:ss 15:59:50 ss++; 3.Program Logic 邏輯? F.4 #include "console.c" x = rand()% + ; y = rand()% + ; gotoxy(x,y); setrgb(1); printf("%i:",hh); ss==60 Y ss=0; mm N clock 2

26 int hh=12,mm=59,ss=50; 只要 ss<60 便重複執行 do{ printf("%02i\r",ss); ss++; if(ss==60){ ss=0;... _sleep(500); while (ss<60); // 停止 0.5 秒 clock 3 do{ printf("%02i:%02i:%02i\r",hh,mm,ss); ss++; if(ss>=60){ ss= ; mm ; if(mm>= ){ if(hh>= ){ hh= ; printf(" \n"); _sleep(1000); while(1); clock 4

27 y x #include <stdio.h> < 標準 > #include "console.c" " 自訂 " main(){ int x=20, y=10; clrscr(); // 清除螢幕 Clear Screen gotoxy (x,y); // 移動游標 printf ("x=20, y=10"); getxy (&x, &y); // 目前游標位置 printf ("x=%i, y=%i\n", x, y); x = wherex(); y = wherey(); printf ("x=%i, y=%i\n", x, y); console.c 1 setrgb(0); setrgb(1); setrgb(2); setrgb(3); setrgb(4); setrgb(8); setrgb(9); setrgb(10); setrgb(11); setrgb(12); setrgb(15); // 白字黑底 // 紅字黑底 // 綠字黑底 // 黃字黑底 // 藍字黑底 // 黑字白底 // 紅字白底 // 綠字白底 // 黃字白底 // 藍字白底 // 白字白底 setrgb(9); printf("c"); setrgb(12); printf("# "); setrgb(14); printf("programming\n"); setrgb(7); C# Programming console.c 2

28 SetScrnSize(80,20); // 設定視窗大小 ( 闊, 高 ) togglefullscreen(); // 全螢幕 gotoxy(20,5); _sleep(1000); clreol(); // clear to end of line gets( ); console.c 3 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),7); printf(" 白字黑底 \n"); console.c 4

29 比較運算子 == equal to!= not equal to > greater than < less than >= greater than or equal to <= less than or equal to if-statement 1 條件 a number 運算子 Operator 意義 meaning 條件 condition 值 value <= 小於或等於 x <= 0 1(true) < 小於 power < MAX_POW 0(false) >= 大於或等於 x >= y 0(false) > 大於 item > MIN_ITEM 1(true) == 等於 mom_or_dad == 'M' 1(true)!= 不等於 num!= SENTINEL 0(false) if-statement 2

30 條件 表示式 1. x 和 y 都大於 z ( ) 2. x 等於 1.0 或 3.0 ( ) 3. x 在 y 和 z 之間 (y<z) ( ) 4. x 不在 y 和 z 的範圍以內已知 y<z ( ) if-statement 3 比較字符 1(true) 0(false) '9' >= '0' 1 0 'a' < 'e' 1 0 'B' <= 'A' 1 0 'Z' == 'z' 1 0 'a' <= 'A' 1 0 ch>='a' && ch<='z' 1 0 if-statement 4

31 相反條件 m==n a<=b complement 相反 (age<=25) (status!='s' t && status!='d') t!( (age<=25) (status!='s' && status!='d') )!(age<=25) &&!(status!='s' && status!='d') if-statement 5 Syntax 語法 if ( 條件 ) 句子 1 ; else 句子 2 ; Ex-1. if (heart_rate_atrest > 56 ) // 靜止心跳 printf("keep up your exercise program!\n"); else printf("your heart rate is in excellent health\n"); Ex-2. if (x!=0) product = product * x; if (x!=0) average = total / x; // product 積 if-statement 6

32 流程圖 A diagram that shows the step-by-step execution of a control structure A diamond-shape box represents a decision A rectangular box represents an assignment statement or a process. 靜止心跳 if-statement 7 嵌套式 if 中有 if 嵌套式 +ve ve 0 Dangling g else if-statement if (x > 0) if (y > 0) a = a + 1; else b = b + 1; // else 屬於最接近的 if 8

33 嵌套式指示 路面情況安全 safe 氣溫 >0 小心駕駛 小心雪地 小心地滑 if-statement 9 路面狀況 溫度 { 前面路滑 停車時間 =2 倍 路面有雪 停車時間 =4 倍 小心駕駛 if-statement 10

34 語法 if (condition 1 ) if (mm==1) Syntax statement 1 maxdays = 31; else if (condition 2 2) else if (mm==2) statement 2 maxdays = 28; else if (condition 3 ) else if (mm==3) statement 3 else if (condition n ) maxdays = 31; else if (mm==12) statement n else maxdays = 31; else default statement maxdays = 0; if-statement 11 if (a==b) printf ("Equal."); else printf ("Not Equal."); if (a=b) printf ("Equal."); else printf ("Not Equal."); printf ("%s", (a==b)?"equal." :"Not Equal."); b = -10; a = (b<0)?-b :b; printf ("a=%i\n", a); a = a = abs(b); if-statement 12

35 聘請保安員條件 (Security Guard) 填寫以下偽代碼 : 犯罪紀錄 : 次數 0 0 性 別 :M/F/ M M 年 齡 : 歲 工作經驗 : 年 3+ 身 高 : 米 c1 = ( 犯罪紀錄 ); c2 = ( 性別 ); c3 = ( 年齡 ) ( 年齡 ) ( 身高 ) ( 工作經驗 ); c4 = ( 年齡 ) ( 年齡 ) ( 身高 ); if( (c1) && (c2) && ((c3) (c4))) 合資格 =1; else 合資格 =0; if-statement if( (c1) && (c2) ){ if f(( ((c3) 3) ( (c4)) 合資格 =1; else 合資格 =0; else 合資格 =0; Compare 比較 4 input numbers: if ( a > b ) x = ; else x = ; if ( c > d ) y = ; else y = ; if (x>y)max= ; else max = ; 2. Leap Year Test 潤年測試 int isleapyear = 0; int yy if ( ) isleapyear=1; 4. 年齡 age, 星期 dow, 收費 fare: else isleapyear=0; if( age< age> ) fare = fare/2; if( dow== dow== ) 3. 某年 2 月份有多少日 : fare = fare*2; max=28; if ((mm (mm ) (yy ))) max=29; 14 if-statement

36 if-statement 常見錯誤 : 1. if(12 < age < 60)... 數學與電腦寫法不同改正 : if(age age ) 2. if(age < 12 > 60)... 欠變數名稱 age 改正 : if(age age ) 3. if(age>60); printf("..."); if 中間不要加 ( ) 改正 : if(age>60) printf("..."); 4. if(age<12 && age>60)... 沒可能改正 : if(age < 12 age > 60) if(age = 12)... 賦值 (age=12); 比較 (age 12) 改正 : if(age 12) if(age > 12 age < 60)... 等同 : if(1)... 改正 : if(age>12 age<60) if(ans=='y' && ans=='n') puts("ok"); 沒可能改正 : if(ans=='y' ans=='n') n puts("ok"); 8. if(ans!='y' ans!='n') puts("error"); 任何輸入都正確改正 : if(ans!='y' ans!='n') puts("error"); 9. scanf("%c",&ch); if(ch=='a' 'b' 'c' 'd')... 改正 : if(ch=='a' ch=='b' ch=='c' ch=='d')... 改正 : if(strchr("abcd",ch)!= NULL)... if-statement 16

37 3a. boy-girl.c Q: Gender: M Age(1-100): 22 A: Man Q: Gender: F Age(1-100): 22 A: Woman Q: Gender: M Age(1-100): 12 A: Boy Q: Gender: F Age(1-100): 2 A: Girl 變數 : gender age char gender='m'; int age=23; 2012 年 09 月 09 日 Greeting 1 char gender='m'; int age=23; while(1){ fflush(stdin); printf("gender (M/F) : "); printf("age(1-100) : "); printf("a: "); if(gender ){ scanf scanf gender = toupper(gender); else{ printf("\n"); 進階 : Baby Little boy Little girl Man Woman Old Man Old Woman 2012 年 09 月 09 日 Greeting 2

38 3b. age.c is a -year-old. (>=21 man/woman; otherwise boy/girl) Q: Name: Chris YOB: 1981 Sex: m A: Chris is a 28-year-old man. 10 years ago, he was =28 Q: Name: Angel YOB: 2000 Sex: f A: Angel is a 9-year-old girl. 9 years later, she will be 年 09 月 09 日 Greeting 3 3c. greeting.c 請安 Q: Name: Lee Gender: M Married/Single: M Time(0-23): 22 A: Good Evening, Mr.Lee. Q: Name: Chan Gender: F Married/Single: M Time(0-23): 10 A: Good Morning, Mrs.Chan. Q: Name: Cheng Gender: F Married/Single: S Time(0-23): 15 A: Good Afternoon, Ms.Cheng 早晨 Morning 午安 Afternoon 晚安 Evening 變數 : name gender mstatus time char name[20]="lee"; char gender='m'; char mstatus='m'; int time=23; 2012 年 09 月 09 日 Greeting 4

39 3d. greeting.c 請安 早晨 Morning 午安 Afternoon 晚安 Evening Q: 姓氏 ( 陳 ) : 陳性別 m/f : F 已婚 / 未婚 : S 時間 0-23 : 15 A: 陳先生午安 Q: 姓氏 ( 陳 ) : 李性別 m/f : M 已婚 / 未婚 : S 時間 0-23 : 10 A: 李先生早晨 Q: 姓氏 ( 陳 ) : 高性別 m/f : M 已婚 / 未婚 : M 時間 0-23 : 20 A: 高太太晚安 變數 : name gender mstatus time char name[20]=" 陳 "; char gender='m'; char mstatus='m'; int time=23; 2012 年 09 月 09 日 Greeting 5 while(1){ fflush(stdin); printf("name : "); if(strlen(name)==0) break; printf("gender (M/F) : "); printf("married/single (M/S): "); printf("time(0-23) : "); printf("a: Good "); if(time> && time< ){ A: Good Evening, Mr.Lee. if(gender 'M') printf(", Mr."); printf(" %s.\n\n", name); 2012 年 09 月 09 日 Greeting 6

40 26. Roots of a Quadratic equation: Ax²+Bx+C=0 Q: enter coefficients (A,B,C): A: Error! A must be non-zero. Q: enter coefficients (A,B,C): A: root1=1.0, root2=-1.0 Q: enter coefficients (A,B,C): A: root1=-1.0 Q: enter coefficients (A,B,C): A: no real root Hint: calculate d=b²-4ac, output with 1 d.p.( 小數 ) if A=0, x= -C/B 27. 日期轉換 conversion: dd-mm-yyyy to words Q: enter date (dd-mm-yyyy): A: Dec 25, 星期轉換 DOW Q: enter day of the week (0-6): 0 A: Sunday Q: enter day of the week (0-6): 6 A: Saturday Months: 1. January, 2. February, 3. March, 4. April, 5. May, 6. June, 7. July, 8. August, 9. September, 10.October, 11.November, 12.December Dow: 0. Sunday, 1. Monday, 2. Tuesday, 3. Wednesday, 4. Thursday, 5. Friday, 6. Saturday 三角形測試 triangle-test Q: 三角形邊長 (a<b<c): A: 等邊三角形 A: 等腰三角形 A: 銳角三角形 Q: 三角形邊長 (a<b<c): A: 直角三角形 A: 銳角三角形 Q: 三角形邊長 (a<b<c): A: 不是三角形 Q: 三角形邊長 (a<b<c): A: 等腰三角形 i. 若 c 大於或等於 a 及 b 之和 ( 不是三角形 ) 否則 ii. 若 c² 等於 a² 及 b² 之和 ( 直角三角形 )Right-angled iii. 若 c² 小於 a² 及 b² 之和 ( 銳角三角形 )Acute iv. 若 c² 大於 a² 及 b² 之和 ( 鈍角三角形 )Obtuse v. 若 a=b=c ( 等邊三角形 )Isosceles vi. 若 a=b 或 b=c 或 c=a ( 等腰三角形 )Equilateral int a,b,c, min,mid,max; // a²,b²,c² 8

41 生肖 Chinese Zodiac Q: 出生年份? 1994 A: 狗年 0 猴 1 雞 2 狗 3 豬 4 鼠 5 牛 char animals[12][3]={ // 12 個元素 " 猴 "," 雞 "," 狗 "," 豬 "," 鼠 "," 牛 ", " 虎 "," 兔 "," 龍 "," 蛇 "," 馬 "," 羊 "; // 文字陣列 do{ scanf ("%i", &yy); // 1994 n = yy%12; 1994 % 12 2 printf ("%s\n", animals[n]); // 狗 2012 年 09 月 09 日星座生肖 Zodiac 1 6 虎 if (n==0) printf(" 猴 \n"); while(1); 7 兔 8 龍 9 蛇 10 馬 11 羊 星座 Zodiac 水瓶 19 雙魚 21 白羊 21 金牛 21 雙子 22 巨蟹 23 獅子 24 處女 23 天秤 23 天蠍 22 人馬 22 山羊 1. 需要變數多少個? mm, dd, zod 2. 變數類型? int float char Q: 出生月日? 1 20 A: 水瓶 (1) Q: 出生月日? 1 19 A: 山羊 (12) Q: 出生月日? 10 1 A: 天秤 (9) mm, dd zod=mm zod 年 09 月 09 日星座生肖 Zodiac 2

42 int mm, dd, zod; scanf zod = if ( ) zod--; if(zod==0) if (zod==1) printf(" 水瓶 \n"); if (zod==2) printf(" 雙魚 \n"); if (zod==3) printf(" 白羊 \n"); 2012 年 09 月 09 日星座生肖 Zodiac 水瓶 19 雙魚 21 白羊 21 金牛 21 雙子 22 巨蟹 23 獅子 24 處女 23 天秤 23 天蠍 22 人馬 22 山羊 int mm, dd, zod, day[13]={0,20,19,; char zodiac[13][5]={"x", " 水瓶 ", " 雙魚 ", ; while (!feof(fp)){ fgets(s,100,fp); days[i]=atoi(); zodiac[i] printf ("%s\n", zodiac[zod]); 2012 年 09 月 09 日星座生肖 Zodiac 4

43 Insurance 保險 宣告變數 : ms, age, gender #include<stdio.h> #include<ctype.h> char ms='s', gender='m'; int age=18; main(){ printf(" 婚姻狀況 (M/S): "); printf(" 年齡 : "); printf(" 性別 (M/F): "); Insurance 保險 方法一 if(ms=='m'){ if(age>=20) printf(" 受保!\n"); else printf(" 不受保!\n"); // 已婚 'M' 已婚 M 未婚 S 已婚 M 未婚 S 受保人士年齡 20 男 : 年齡 >30 女 : 年齡 >25 1 受保人士年齡 20 男 : 年齡 >30 女 : 年齡 >25 else{ // 未婚 'S' printf("\n"); Insurance 保險 2

44 36. 私家車保險 Motor Insurance 1. 車價 estimated_value 2. 投保項目 coverage 0 綜合保險 1 第三者責任保險 車 價 : 汽 缸 : 3000 無索償 ( 年 ): 2 ncd = 30% 綜合保險費 = $ 汽缸容積 type of engine / capacity % 1,650c.c. 或以下 % 1,650c.c. 至 3,500c.c % 3,500c.c. 以上 4. 無索償折扣 (No Claim Discount) 無索償保險期 續保保費折扣 ncd 一年 20% 連續 兩年 30% 連續 三年 40% 連續 四年 50% 五年或以上 60% 變數 : estvalue capacity engtype year, ncd premium, p Insurance 保險 3 5. 全年保費 premium 綜合保險汽缸容積 (0) p = 車價 8.4% 或 1000 ( 取較多者 ) 保費 = $(p+8600) (1-ncd) 1.03 汽缸容積 (1) p = 車價 5.5% 或 1000 ( 取較多者 ) 保費 = $(p+9500) (1-ncd) 1.03 汽缸容積 (2) p = 車價 5.8% 或 1000 ( 取較多者 ) 保費 = $(p+9700) (1-ncd) 1.03 第三者責任保險 保費 = $5000 (1-ncd) 1.03 Insurance 保險 4

45 while 當 / 只要 int n=0; int n=0; while(1){ do{ printf("%i\n",n); printf("%i\n",n); n++; n++; _sleep(100); while(n<6); int n=0; int n=0; while(n<6){ do{ printf("%i\n",n); printf("%i\n",n); n++; scanf("%i", &n); while(n<6); while-for 1 範 int mm=0; do{ 圍 printf("month? "); 檢 scanf("%i", &mm); if( ) 測 printf("error\n"); while( ); Range Check char ans='y'; do{ fflush(stdin); printf(" 是否繼續? "); scanf("%c", &ans); if( ) printf("error\n"); while( ); while-for 2

46 int sum=0, n=1; sum = sum+ while( n<=5 sum = sum+n; ){ sum = sum+ sum = sum+ n++; sum = sum+ sum = sum+ printf("sum = %i\n",sum); Sum = 難題 : n 1000 n =?? int sum=0, n=1; while( ){ n++; printf("n = %i\n", n); while-for 3 int n=1234; while(n>0){ printf("%i\t", n ); n = n/10; int n=1234; while(n>0){ printf("%i\t", n%10 ); n = n/10; while-for 4

47 int n=4; for( ; n<5 ; ){ printf("%i",n); int n=0; int n; for( ; n<5 ; ){ for(n=0; n<5; n++){ printf("%i\n",n); printf("%i\n",n); n++; int n; for(n=10; n<=20; n+=2){ printf("%i\n",n); while-for 5 int i,n; srand(time(null)); for (i=0; i<3; i++) { Roll a Die 擲骰子 printf("%i\t", n); Mark VI (1-49)? printf("enter n (2-100): "); scanf("%i", &n); prime = 1; // n 是質數 for (x=2; ; x++){ if( ) prime = 0; // n 非質數 if (prime==1) printf("n n 是質數 \n"); n x n 2 n 3 n 4 : while-for 6

48 因數 Factors of N printf("enter n (2-100): "); scanf("%i", &n); for (x=2; ; x++) if( ) printf ("%i", x); Q: n=? 24 A: 1,2,3,4,6,8,12,24 質因數 Pi Prime factors of N? printf("enter n (2-100): "); Q: n=? 24 scanf("%i", &n); A: 2,2,2,3 for (x=2; ; x++) while( ){... printf ("%i", x);... Q: n=? 36 A: = 36 while-for 7 練習 : 只利用一句 for/while 句子, 顯示以下資料 a) 1, 2, 3,..., 9, 10 b) 1, 3, 5,..., 19 c) 2, 4, 6,..., 20 d) 31, 32, 33,...,, 39 e) 20, 18, 16,..., 6, 4, 2 f) 5, 10, 15,..., 45, 50 g) 5, 15, 25..., 95 h) 1, 4, 9, 16,..., 81, 100 i) 1, -2, 3, -4,..., 9, -10 j) 1+2, 2+3, 3+4,..., 9+10 k) -4, -3, -2, -1, 0, 1, 2, 3, 4 l) 4, 3, 2, 1, 0, 1, 2, 3, 4 m) 1, 2, 3, 4, 5, 4, 3, 2, 1 while-for 8

49 Range check 範圍檢查 : 19/10/ int age; int score; int month; 1-12 char sex; 'M' or 'F' char house; 'L','M','C','S' L,M,C,S char answer; 'y' or 'n' /* 1a */ do{ printf ("Q: age(1-100)? "); scanf ("%d", &age); if( ) printf ("Error\n"); while ( ); Range Check 1 /* 1b */ do{ printf ("Q: age(1-100)? "); scanf ("%d", &age); if( ) printf("error\n"); while (! ( ) ); /* 1c */ while ( ){ printf ("Q: age(1-100)? 100)? "); scanf ("%d", &age); if (!( ) ) printf("error\n"); Range Check 2

50 /* 2a */ do{ printf ("Q: are you hungry<y/n>? "); scanf ("%c" (%c, &ans); ans = toupper(ans); while ( ); /* 2b */ do{ printf ("Q: are you hungry<y/n>? "); scanf ("%c",&ans); ans = toupper(ans); if (!( ( ))) printf ("Error\n"); while (!( ) ); Range Check 3 /* 3a */ do{ printf ("Q: month (1-12)? "); scanf ("%d", &mm); printf ("Q: day (1-31)? "); scanf ("%d", &dd); max = 31; if (!( ) ) printf ("Error - out of range!\n"); while ( ); Range Check 4

51 20. Admission fee 入場費 週末 (0,6) 平日 (1-5) (1) 基本收費 fee = 100; (2) 14:00 前否則 fee 1.1 = $110 fee 0.9 fee 1 (3) 60 歲以上 fee 歲以下或學生 fee fee 變數 : dow(0-6), time(10-18), age(1-99), stud(y/n) Q: 星期 (0-6): 0 時間 (10-18): 10 年齡 (1-99): 12 學生 (y/n): n A: 入場費 = HK$110.0 Q: 星期 (0-6): 1 時間 (10-18): 15 年齡 (1-99): 9 學生 (y/n): n A: 入場費 = HK$50.0 Admission Fee 1 Q4. 試寫 C 程式, 根據以下條件計算及列印使用者應付入場費多少 : a. 宣告變數 : fee( 收費 ) dow( 星期 ) time( 入場時間 ) age( 年齡 ) b. 要求使用者輸入 : 星期 (dow) 入場時間 (time) 年齡 (age) c. 設基本收費 fee 為 $100 int time, age, dow; float fee; Q: 星期 (0-6): 3 時間 (10-18): 13 年齡 (1-99): 22 A: 入場費 = HK$100.0 fee = 100; Admission Fee 2

52 例子 1 ( 基本收費 ) 例子 2 ( 星期日 ) Q: 星期 (0-6): 3 時間 (10-18): 15 年齡 (1-99): 22 A: 入場費 = HK$100.0 Q: 星期 (0-6): 0 時間 (10-18): 11 年齡 (1-99): 22 A: 入場費 = HK$110.0 例子 3 ( 長者 + 星期日 ) 例子 4 ( 長者 + 星期一早上 ) 例子 5 ( 長者 + 星期一下午 ) Q: 星期 (0-6): 0 時間 (10-18): 11 年齡 (1-99): 70 A: 入場費 = HK$55.0 Q: 星期 (0-6): 1 時間 (10-18): 11 年齡 (1-99): 70 A: 入場費 = HK$35.0 Q: 星期 (0-6): 1 時間 (10-18): 15 年齡 (1-99): 70 A: 入場費 = HK$50.0 例子 6 ( 小童 + 星期日 ) 例子 7 ( 小童 + 星期一早上 ) 例子 8 ( 小童 + 星期一下午 ) Q: 星期 (0-6): 0 時間 (10-18): 11 年齡 (1-99): 11 A: 入場費 = HK$110.0 Q: 星期 (0-6): 1 時間 (10-18): 11 年齡 (1-99): 11 A: 入場費 = HK$56.0 Q: 星期 (0-6): 1 時間 (10-18): 15 年齡 (1-99): 11 A: 入場費 = HK$ 年 09 月 13 日 Admission Fee 3 d. 若在週末 ( 星期六 日 ) 進入該公園, 收費會加 10% e. 若在平日 ( 星期一至五 ) 進入該公園, 而進入時間為 14:00 或以前, 收費會減 30% 星期 dow Sat/ Sun Mon Fri +10% f. 調整收費後, 再計算年齡折扣 方法如下 : 60 歲以上長者 : 星期一至日, 再減 50% 12 歲以下小童 : 星期一至五, 再減 20% g. 輸出應付收費 ( 顯示一位小數 ) Admission Fee age >60 <12 or student time<14:00 X 50% Sat/ Sun 10% X Mon Fri 50% 4

53 #include <time.h> int dow (int yy, intmm, intdd){ struct tm tsruct; tsruct.tm_mday = dd; tsruct.tm_mon = mm-1; tsruct.tm_year = yy-1900; tsruct.tm_hour = 0; tsruct.tm_min = 0; tsruct.tm_sec = 1; tsruct.tm_isdst =-1; if(mktime(&tsruct)==-1) tsruct.tm_wday=7; return (tsruct.tm_wday); // 星期 0-6 呼叫方法 :n = dow (2009, 12, 25); void sysdate (int *yy, int *mm, int *dd){ time_t t; struct tm *tb; t = time(null); tb = localtime(&t); *dd = tb->tm_mday; *mm = tb->tm_mon+1; *yy = tb->tm_year+1900; void systime (int *hh, int *mm, int *ss){ time_t t; struct tm *tb; t = time(null); tb = localtime(&t); 呼叫方法 : sysdate (&y, &m, &d); *hh = tb->tm_hour; *mm =tb->tm_min; *ss = tb->tm_sec; dow main(){ int dd=1,mm=9,yy=2009,n, hr,min,sec; sysdate (&yy, &mm, &dd); n = dow (yy,mm,dd); printf(" 今天是 %i 年 %02i 月 %02i 日 ", yy, mm, dd); printf(" 星期 %i\n", n); if(n==0) printf(" 星期日 \n"); if(n==1) printf(" 星期一 \n"); if(n==2) printf(" 星期二 \n"); if(n==3) printf(" 星期三 \n"); if(n==4) printf(" 星期四 \n"); if(n==5) printf(" 星期五 \n"); if(n==6) printf(" 星期六 \n"); systime (&hr, &min, &sec); printf("%02i:%02i:%02i\n", hr, min, sec); dow2010 2

54 每月 13 日是星期幾 (0-6)?? n = dow (2009, 1, 13); printf(" 星期 %i\n", n); n = dow (2009, 2, 13); printf(" 星期 %i\n", n); n = dow (2009, 3, 13); printf(" 星期 %i\n", n); n = dow (2009, 12, 13); printf(" 星期 %i\n", n); 功課 : 黑色星期五 Black Friday Q: yy? 2009 mm? 10 dd? 13 A: Tue( 星期二 ) Q: Enter year (>1970) /02/2009 is a Black Friday. 13/03/2009 is a Black Friday. 13/11/2009 is a Black Friday. 進階 : 試列出十年內所有黑色星期五 dow main(){ int mm, yy; do{ printf ("\nenter year (>1970) "); fflush (stdin); scanf ("%i", ); while (yy<=1970); mm= while(mm ){ if () printf ("13/??/?? is a Black Friday.\n"); 額外練習 : 試找出以下日子是星期幾? 元旦日 聖誕節 國慶 生日 dow2010 4

55 Calendar 月曆 int yy=2009; mm=12, dd; printf ("%i\t", 1); printf ("%i\t", 2);... printf ("%i\t", 7); printf ("\n"); max=31; 12 月 n=0 S M T W T F S printf ("%i\t", 29); printf ("%i\t", 30); printf ("%i\t", 31); printf ("\n"); for (dd ){ printf ("%i\t", dd); if(dd ) printf("\n"); Calendar 1 Calendar 月曆 yy=2009; mm=12; dd=1; n = dow(yy,mm,dd); // 星期幾 do{ printf ("%i\t", dd); if(dd ) printf("\n"); dd while( ); dd 可被 7 整除 只要 dd 31 Calendar (dd+n) 可被 7 整除 11 月 n=0 S M T W T F S 月 n=2 S M T W T F S

56 yy=2009; mm=12; dd=1; n = dow(yy,mm,dd); max = 31; // 28,30?? do{ printf ("%i\t", dd); if( ) printf("\n"); while( ); 2009 年 11 月 S M T W T F S 年 12 月 S M T W T F S Calendar 3 printf(" 輸入年份 : "); scanf("%i", &yy); for (mm=1; ){ n = dow(yy,mm,1); // 星期? max = 31; printf("%i 年 %i 月 \n", yy,mm); for (dd=1; ){ printf("%i\t", ); if( ) printf("\n"); printf ( ); Calendar 4

57 Quiz 輸入年份 : 2009 for (mm ){ n = dow(yy,mm,1); max = 31; printf // 輸出 1,2,28/30/31 for ( ){ printf 2009 年 11 月 2009 年 11 月 S M T W T F S 年 12 月 S M T W T F S Calendar 5 Q3. 試寫 C 句子, 顯示二 九年某月之月曆 Q: 月份? 99 scanf( %i,&mm); 輸入錯誤 Q: 月份? 5 n = dow(yy,mm,1); 2009 年 5 月 SUN MON TUE WED THU FRI SAT 靠右 \t \t \t \t \t 1 2 對齊 maxday [mm] Calendar 6

58 int maxday[13]={0,31,28,31,30,31,30,31,31,30,31,30,31; main(){ int yy=2009, mm, n, i, d; do{ printf("q: 月份? "); scanf("%i", &mm); if(mm<1 mm>12) printf(" 輸入錯誤 \n"); while (mm<1 mm>12); printf("%i 年 %i 月 \n", yy, mm); // 2009 年 5 月 printf("sun \t MON \t TUE \t WED \t THU \t FRI \t SAT\n"); n = dow(yy,mm,1); for(i=0; ) printf("\t"); // n 個空格 for(d=1;d<=maxday[mm];d++){ ;d++){ // 1-31/30 日日 printf("%i\t", d); if((n+d)%7==0) printf("\n"); ) printf("\n"); printf("\n"); Calendar 7

59 while 廻路 for 廻路只要 i<10 i=0; do{ i++; while (i<10); printf("%i", i); 初始化 i=0 i=0; for ( ; i<10; ) { printf("%i", i); i++; 每完成 1 次 只要 i<10 輸出 : 年 10 月 22 日 for-loop 1 輸出 : 輸出 : for ( ) for ( ) printf("%i", i); printf("%i", i); 輸出 : for ( ) printf("%i", i); 輸出 : i=1, j=9 for ( ) printf("i=%i i=%i, j=%i\n", i, j); i=2, j=8 i=3, j=7 i=4, j=6 i=5, j= 年 10 月 22 日 for-loop 2

60 Q2 j=1 int i,j; i=1 1 for (i=1; ; i++){ 1 2 printf("%*s",, ); i=5 for (j=1; ; j++) printf ("%i ", ); printf( ); for-loop 3 某數 x, 若除以 3, 餘數是 a; 若除以 5, 餘數是 b; 若除以 7, 餘數是 c; 求 x 的可能值 x 必須在 的範圍以內, 而 a,b,c 是由使用者輸入的 Q3 int a,b,c,x; printf ("Q: a,b,c: "); scanf ("%i%i%i", ); printf ("A: x = "); Q: a,b,c: A: x = 103, 208,... Q: a,b,c: A: x = 8, 113,... for (x=1; ; x++){ if printf ("%i %i, ", x); for-loop 4

61 的士收費 : 短加長減 市區的士 2km $18 7km $1.5/200m $70.5 $1.0/200m 新界的士 2km $14.5 6km $1.3/200m $53.5 $1.0/200m 大嶼山 2km $13 18km $1.3/200m $130 $1.2/200m Taxi Fare 1 市區的士 新界的士 大嶼山的士 fare1 首 2 公里 $18.0 $14.5 $13.0 fare2 每 200m $1.5 $1.3 $1.3 limit 車費多於 $70.5 $53.5 $130.0 fare3 每 200m $1.0 $1.0 $1.2 float dist=0; // 距離 km double pay; // 應付 $ do{ dist += 0.2; if (dist<=2) pay = 18; else if ( ) pay else pay printf ("dist=%5.1f, pay=%5.1f\n", ); while (dist<10); dist=0.2, pay=18.0 dist=0.4, pay=18.0 dist=1.8, pay=18.0 dist=2.0, pay=18.0 dist=2.2, pay=19.5 Taxi Fare 2

62 printf (" 市區 (0) 新界 (1) 大嶼山 (2): "); scanf ("%i", &d); 0 do{ dist += 0.2; if (dist<=2) pay = else if ( ) pay else pay printf ("dist=%5.1f, pay=%5.1f\n", dist, pay); while (dist<10); Taxi Fare 3 輸出以下資料 pay1 pay2 pay3 市區 新界 大嶼山 2.0 km km km km km km km km km km Taxi Fare 4 4

63 float pay[3] = {0,0,0; float fare1[3] = {18.0, 14.5, 13.0; float fare2[3] = { 1.5, 1.3, 1.3; main(){ float fare3[3] = { 1.0, 1.0, 1.2; do{ float limit [3] = { 70.5, 53.5, 130; dist += 0.2; printf ("dist=%5.1f", dist); for (d=0; d<3; d++){ printf ("\t%8.1f", pay[d]); printf ("\n"); while (dist<10); Taxi Fare 5 << 火柴遊戲 1 >> 有火柴共 21 支, 由兩人 (A,B) 對賽, 每人輪流抽取 1/2/3/4 支, 取最後一支者敗 尚餘火柴 : 21 必須做範圍測試 變數名稱 max n turn 意義尚餘火柴數目輸入火柴數目 0(A),1(B) A : 1 尚餘火柴 : 20 B : 2 尚餘火柴 : 18 A : 1 尚餘火柴 : 0 B 勝! turn = 0 表示 A turn = 1 表示 B max=21, n=0, turn=1; 顯示尚餘火柴數目 do{ 輸入火柴數目 n 從 max 扣除 n 顯示尚餘火柴數目 max 轉人 (turn=0,turn=1) while( 還有火柴 ); 顯示結果 6

64 << 火柴遊戲 2 >> 遊戲規則不變, 但轉由電腦及使用者輪流對賽, 使用者抽取 1/2/3/4 支火柴, 而電腦則以隨機數代抽 變數名稱 max n turn 意義尚餘火柴數目輸入火柴數目 0,1 尚餘火柴 : 21 使用者 : 1 尚餘火柴 : 20 電腦 : 2 尚餘火柴 : 18 使用者 : 1 尚餘火柴 : 0 電腦勝! turn = 0 表示電腦 turn = 1 表示使用者 max=21, n=0, turn=1; 顯示尚餘火柴數目 do{ 火柴數目 ( 輸入 / 隨機數 )n 從 max 扣除 n 顯示尚餘火柴數目 max 轉人 (turn=0,turn=1) while( 還有火柴 ); 顯示結果 7 << 火柴遊戲 3 >> 遊戲規則不變, 由電腦及使用者輪流對賽, 使用者抽取 1/2/3/4 支火柴, 而電腦則抽 (5 n) 支, 使用者必須先抽 變數名稱 max n turn 意義尚餘火柴數目輸入火柴數目 0,1 尚餘火柴 : 21 使用者 : 1 尚餘火柴 : 20 電腦 : 4 尚餘火柴 : 16 使用者 : 1 尚餘火柴 : 0 電腦必勝! turn = 0 表示電腦 turn = 1 表示使用者 max=21, n=0, turn=1; 顯示尚餘火柴數目 do{ 火柴數目 ( 輸入 / 計算 )n 從 max 扣除 n 顯示尚餘火柴數目 max 轉人 (turn=0,turn=1) while( 還有火柴 ); 顯示結果 8

65 (1) Loan 借貸 100,000*0.5% 100, ,000 輸入 輸出 本金 (p) 100,000 年利率 (R%) 6 每月還款 (A) 1,000 月利率 (r%) 0.5% 月息 (I) $500 n P 0 I=P 0*r P 1=P 0+I-A total 期本金利息新本金累積利息 1 100, , , , , , , , 列印每月欠款及還款情況, 直至全數清還為止 Loan 借貸 Mortgage 按揭 1 (2) Mortgage 按揭 輸入 變數 意義 例子 / 公式 P 0 Principal 本金 1,000,000 (Loan Amount) R Interest Rate (%) 年利率 12% per annum r = 1% per month N Number of years (Loan period) 年期 10 n = 120 installments 120 期 計算 n A Monthly Repayment 每月供款 P0 r(1 r) A n Amount (1 r) 1 = $14,347 I Interest 利息 1,000,000 1% = 10,000 P 1 New Principal 新本金 1,000, ,000 14,347 Loan 借貸 Mortgage 按揭 2

66 輸出 Sample outputs: n = 120, r = 1%, A = $14,347 1,000,000*1% 1,000, ,000 14,374 每月供款 n P 0 本金 Interest=P 0 *r 利息 P 1 =P 0 +I-A 新本金 Total Interest paid so far 累積利息 1 1,000,000 10, ,653 10, ,653 9, ,262 19, ,262公式 Formulae: 9, ,827 29, ,827 9, ,348 39,736 Interest = Principal * Interest Rate 5 982,348 年息 9,823 = 本金 (P 977,824 49,559 i ) 年利率 (R)... 月息 (I) = 本金 (P i ) 月利率 (r) 120 New Principal n P0 r(1 r) = Principal + Interest Monthly Repayment Amount A 新本金 (P i+1 ) = 上月本金 (P i ) + 本月利息 (I) 每月供款 (A) (1 r) n 1 Loan 借貸 Mortgage 按揭 3 (3) Repayment Amount: P 0 = 10,000 每月供款 A n P0 r(1 r) n (1 r) 1 10 yr 11 yr 12 yr 13 yr 14 yr 2.00% % % % % % % % % 本金 87.6 Loan 82.3 Amount ($1,000,000) % 年利率 88.8 Interest 83.5Rate (% 79.1 per annum) 年期 No.of Years / Months 4.50% 月供 Monthly Repayment 4.75% 利息 91.2 Total 86.0 Interest Paid 81.6 Loan 借貸 Mortgage 按揭 4

67 一般宣告變數方式 ( 沒有陣列的日子 ) int a,b,c,d,e,f,g,h,..., aa,ab,...,zx,zy,zz; a = 1; b = 2; scanf ("%i%i%i%i", &a, &b, &c, &d); d = a+b+c; 宣告大量變數 以陣列方式宣告變數 1000 個元素 int a[1000]; a[0] = 1; a[1] = 2; a[ ] = 66; scanf ("%i%i%i%i", &a[0],&a[1],&a[2],&a[3]); array 陣列 1 陣列 days[ 0] days[ 1] 宣告句子 int days ; days[ 2] days[ 3] 28 days[ 4] 賦值句子 days = 28; days[ 5] days[ 6] 輸出句子 printf ("%i", days ); days[ 7] days[ 8] 輸入句子 scanf ("%i", &days ); days[ 9] days[10] days[11] array 陣列 days[12] 2

68 for (i=1; ;i++) days = 31; array 陣列 days[ 1] = 31; days[ 2] = 31; days[ 3] = 31; days[ 4] = 31; days[ 5] = 31; days[ 6] = 31;... days[10] = 31; days[11] = 31; days[12] = 31; days[ 0] days[ 1] days[ 2] days[ 3] days[ 4] days[ 5] days[ 6] days[ 7] days[ 8] days[ 9] days[10] days[11] days[12] for (i=1;i<=12;i++) printf("%i", ); array 陣列 printf("%i", days[ 1]); printf("%i", days[ 2]); printf("%i", days[ 3]); printf("%i", days[ 4]); printf("%i", days[ 5]); printf("%i", days[ 6]);... printf("%i", days[10]); printf("%i", days[11]); printf("%i", days[12]); days[ 0] days[ 1] days[ 2] days[ 3] days[ 4] days[ 5] days[ 6] days[ 7] days[ 8] days[ 9] days[10] days[11] days[12]

69 for (i=1;i<=12;i++) scanf("%i", ); days[ 0] days[ 1] days[ 2] scanf("%i", &days[ 1]); scanf("%i", &days[ 2]); scanf("%i", &days[ 3]); scanf("%i", &days[ 4]); scanf("%i", &days[ 5]); scanf("%i", &days[ 6]);... scanf("%i", &days[10]); scanf("%i", &days[11]); scanf("%i", &days[12]); days[ 3] days[ 4] days[ 5] days[ 6] days[ 7] days[ 8] days[ 9] days[10] days[11] array 陣列 days[12] 31 5 a[0] a[1] a[999] for (i=0; i<1000; i++) a[i]=i; for (i=0; i<1000; i++) a[i]=1000-i; for (i=0; i<1000; i++) a[i]=2*i; for (i=0; i<1000; i++) a[i]=2*i+1; array 陣列 6

70 int score[40]; // 40 個分數 char grade[40]; // 40 個等級 grade[0] = ; grade[1] = ; 0 1 score[i] grade[i] D C for (i=0; ;i++){ if (score >=50) grade ='P'; else grade ='F'; B B B for (i=0;i<40;i++){ if (score[i]<=20) grade[i]='e'; else if (score[i]<=40) grade[i]='d'; else if (score[i]<=60) grade[i]='c'; else if (score[i]<=80) grade[i]='b'; else ; A array 陣列 7 輸出畫面 : Q: 輸入整數 (1-999): 34 A: thirty four 算法 algorithm: 1. 準備兩個陣列 units[] tens[] 2. 使用者輸入整數 (n) 3. 若 n<20 則輸出文字 (units[n]) 4. 否則 ( 利用 % 及 /) 把 n 分柝為個位 unit digit 及十位 tens digit 輸出適當文字 seven seventy literals 文字 : one two three four five six seven eight nine ten 8 eight eighty eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen 9 nine ninety twenty thirty forty fifty sixty seventy eighty ninety if(n<20) printf 18 eighteen else if(n<100){ d1 = 19 nineteen d10 = array 陣列 test: 19,20,209,211,2010, units[i] one two three four five six tens[i] twenty thirty forty fifty sixty

71 1. sum of first n integers 首 n 個整數的和 int i, sum=0; for (i=1;i<=10;i++) sum = ; 2. factorial of n: 首 n 個整數的積 int i, factorial=1; for (i=1;i<=10;i++) factorial = ; 3. alphabets: 字母 char ch; for (ch= ;ch<= ;ch++) printf ("%d %c\n", ch, ch); for (ch= ;ch<= ;ch++) printf ("%d %c\n", ch, ch); array 陣列 65 A 66 B 90 Z 97 a 98 b 122 z 9 3. shift left 左移 / 上移 a[0] = a[ ]; a[1] = a[ ]; a[2] = a[ ]; for (i=0;i<9;i++) a[ ] = a[ ]; 4. shift right 右移 / 下移 a[1] = a[ ]; a[2] = a[ ]; a[3] = a[ ]; for (i= ;i ;i ) a[ ] = a[ ]; array 陣列 當 i=9, a[9]=a[ ]; 當 i=8, a[8]=a[ ]; 當 i=1, a[1]=a[ ]; 10

72 5. swapping x,y 互換 int x=100, y=50, t; t = ; x = ; y = ; 6. swapping a[0],a[9] 互換 int a[10], t; t = a[ ]; a[ ] = a[ ]; a[ ] = t; reverse 倒轉 ( 數值 ) for (i=0;i< ;i++){ array 陣列 t = a[i]; a[i] = a[ ]; a[ ] = t; 8. reverse 反轉 / 倒轉 ( 列印 ) for (i=9;i ;i--) printf ("%d\n", a[i]); for (i=0;i<10;i++) printf ("%d\n", a[ ]); 陣列的應用 (a) char animals[ ][3]={" 猴 "," 雞 "," 狗 "," 豬 "," 鼠 "," 牛 ", " 虎 "," 兔 "," 龍 "," 蛇 "," 馬 "," 羊 "; yy=1980; printf ("%s\n", animals[yy ]); (b) char monthname[ ][4] ={"?","Jan","Feb","Mar","Apr","May","Jun", "Jul","Aug","Sep","Oct","Nov","Dec"; mm=9; printf ("%s\n", monthname[ ]); array 陣列 (c) char cdow[ ][4] ={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"; 12

73 (d) char cnum[ ][ ] ={" "," 一 "," 二 "," 三 "," 四 "," 五 "," 六 "," 七 "," 八 "," 九 "; n=24; x = y = printf ("%s 十 %s\n", cnum[ ], cnum[ ]); (e) int maxday[13] ={0, 31,28,31,30,31,30,31,31,30,31,30,31; do{ printf ("Enter mm,dd "); scanf ("%i%i", &mm, &dd); while (mm<1 mm>12 dd<1 dd>31); array 陣列 13 (f) char zodiac[ ][ ]={" 山羊 ", " 水瓶 "," 雙魚 "," 白羊 "," 金牛 "," 雙子 "," 巨蟹 ", " 獅子 "," 處女 "," 天秤 "," 天蠍 "," 人馬 "," 山羊 "; int zday[ ]={0, 20,19,21,21,21,22,23,24,23,23,22,22; Q: mm dd? 2 22 A: 雙魚 z = mm; Q: mm dd? 2 10 if(dd< A: 水瓶 printf ("zodiac = \n", zodiac[ ]); array 陣列 14

74 統計 (0-9) int i, n, count[10]={0; for (i=0;i<10;i++) count[ ]=0; do{ while(1); scanf("%i", &n); if (n>=0 && ) count[ ]++; for (i=0;i<10;i++) printf("%i : %i \n",, count[ ]); i count [i] array 陣列 15

75 Prime Number ( 質數 1) Q: Enter n: 13 A: 13 is prime Prime Number ( 質數 1) Q: Enter n: 24 A: 24 is not prime n % j 13 % 2 = 1 13 % 3 = 1 13 % 4 = 1 13 % 5 = 3 13 % 6 = 1 13%12 = 1 沒有一個 j 可以整除 n n % j 24 % 2 = 0 24 % 3 = 0 24 % 4 = 0 24 % 5 = 4 24 % 6 = 0 24%23 = 1 至少有一個 j 可以整除 n for (j=2;j<;j++) if (nj) break; if (j) printf (" prime\n"); else printf (" not prime\n"); 質數 1 質數 Prime Factors ( 質因數 2) Q: Enter n: 70 A: 70 = n % j = r 70 % 2 = 0 35 % 3 = 2 35 % 4 = 3 35 % 5 = 0 7 % 6 = 1 7 % 7 = 0 scanf("%i", &n); for (j=2;j<;j++) if (n%2==0){ printf n = Prime Factors ( 質因數 2) Q: Enter n: 24 A: 24 = n % j = r 24 % 2 = 0 12 % 2 = 0 6 % 2 = 0 3 % 3 = 0 scanf("%i", &n); j=2; while (n>?){ if (n%?==0){ printf n = else // 試下一個數 2

76 Prime Number ( 質數 3) Q: Enter max: 100 A: prime numbers are 2,3,5,7,11,13,,97 for (n=2;n<100;n++){ n=24; for (j=2;j< n;j++) if (n%?==0) break; if(j) printf 質數 Prime Number ( 質數 4) Q: Enter max: Array A: prime numbers are 2,3,5,7,11,13,,97 n j*n j=2 j=3 j=4 j=5 j=6 j=7 : 凡 j 的倍數都不是質數 10 質數 4

77 Prime Number ( 質數 1-100) int prime[101]={0; for (i=1;i<101;i++) prime[i]=1; 假設全部為質數 (1) 非質數 (0) k=2 prime[4] = 0; prime[6] = 0; prime[8] = 0; prime[10] = 0; prime[100] = 0; k=3 prime[6] = 0; prime[9] = 0; prime[12] = 0; prime[15] = 0; prime[99] = 0; k=4 prime[k*2] = 0; prime[k*3] = 0; prime[k*4] = 0; prime[k*5] = 0; prime[k*25] = 0; k=2; for (j=2;j<;j++) prime[...] = 0; k=3; for (j=2;j<;j++) prime[...] = 0; 質數 printf("100 以內的質數 : "); for(i=2;i<100;i++) if(prime[i]==1) printf(...); 5 HCF/GCD Q: Enter a,b: A: common factors are 公因數 2,3,6 min = printf ("A: common factors are "); for (j=2; j<min; j++){ if( ){ printf (" %i, ", ); hcf = ; printf ("\n 最大公因數 HCF= %i\n", hcf); 質數 6

78

79 n=rand()% ; 列印出來 int card[ ], num[ ]; for(i= ;i< ;i++) num[ ]= ; for(i= ;i< ;i++){ for(i=0;i<52;i++){ do{ n=rand()%52; n=rand()% ; while(num[ ] ); card[i] card[ ] = n; = ; num[ ] = ; n=7; num[7]<1 num[7] =0; for(i= ;i< ;i++) card[ ]= ; card[0] 7 num[0] 1 card[1] 11 num[1] 1 card[2] 51 num[2] 1 card[3] 33 num[3] 1 card[4] 22 num[4] 1 card[5] num[5] 1 card[6] num[6] 1 card[7] num[7] 0 card[8] 7 num[8] 1 card[51] num[51] card[i] card[i]

80 char suit[4] = {" 葵扇 "," 紅心 "," 梅花 "," 階磚 "; char alpha[13]= "A JQK"; for(i=0;i<52;i++){ printf("%2i \n", card[i]); n = card[ ] ; // 花 0-3 printf("%2i \n", n); 第 1 張 : 28 ( 梅花 3) 點數 : 3 第 2 張 : 25 ( 紅心 K) 點數 :10 第 3 張 : 50 ( 階磚 Q) 點數 :10 printf("%2i \n", suit ); // " 葵扇 "," 紅心 "," 梅花 "," 階磚 " printf(" 點數 :%2i \n", card[i] ); //

81 String string 1 String / 1. : char s1[10]; char *s2; char s3[] = "Chan Tai Man"; char s4[20] = "Chan Siu Ming"; char s5[]={'h','e','l','l','o','\0'; s3 C h a n T a i \0 M a n \0 printf ("%s\n", s3); s3[8]='\0'; printf ("%s\n", s3); string 2

82 2. char s[]="game Over\n"; printf (s); printf ("Game Over\n"); printf ("Game" " " "Over" "\n"); // printf ("%s\n", s); (stdout, "%s", s); (s, stdout); string 3 3. scanf ("%s", s); gets (s); scanf ("%s%s", firstname, lastname); fgets (s, 20, stdin); & fscanf (stdin, "%s", s); //?? keyboard string 4

83 4. 'c'-'c'=99-67 char s[10]="chan tm", t[10]="chan TM"; string if (strcmp(s,t)==0) printf ("%s=%s\n", s, t); if (strcmp(s,t)<0 ) printf ("%s<%s\n", s, t); if (strcmp(s,t)>0 ) printf ("%s>%s\n", s, t); n = stricmp(s,t); 0 // ignore cases ('A' = 'a') 32 ' ' 48 '0' 49 '1' 64 '@' 65 'A' 66 'B' 67 'C' 97 'a' 98 'b' 99 'c' 5 4. int stringcompare (const char *s1, const char *s2){ while(*s1==*s2){ if(*s1=='\0' && *s2=='\0') return 0; s1++; s2++; if(*s1>*s2) return 1; return -1; main(){ char s[10]="chan tm", t[10]="chan TM"; n = stringcompare (s, t); string 6

84 5. FILE *fp, *fp2; // file pointers string // fp = fopen ("abc.txt", "r"); // read fp2 = fopen ("xyz.txt", "w"); // write while (! feof(fp) ){ // // fgets (s, 20, fp); printf ("%s", s); fprintf (fp2, "%s", s); fclose (fp); fclose (fp2); // // 7 5. / fprintf (fp, "%s", s); fputs (s, fp); / fgets (s, 10, fp); // ( 10char) fscanf (fp, "%s", s); fscanf (fp, "%i", &n); Chan TM Chan Tai Man string 8

85 6. char s[20]="face", t[20]; n=strlen (s); // string length s = "face"; strcpy (s, "face"); "fac" strncpy (t, s, 3); strncpy (t, s+1, 3); "ace" s f s+1 a s+2 c s+3 e s+4 \0 // illegal // string copy t = s[0]+s[1]+s[2] t = s[1]+s[2]+s[3] string 9 6. ( ) char s[20], t[20]; if (s=="face").. if (strcmp (s, "face")==0 ).. // illegal // if (strstr (s,".txt")==null) // s ".txt" strcat (s,".txt"); // string concatenate char s[]="a123456(7)"; printf("%s", ); s s+1 s+2 printf("%c", ); s[0] s[1] printf("%i", ); s[0] s[1] string 10

86 : char *p, key; p = str ("abc.txt html jpg", ' '); printf ("%s", p); p = strrchr ("abc.txt html jpg", ' '); printf ("%s", p); if (str ("abc.txt html jpg", "txt")) printf ("txt!\n"); printf ("Q: [Y]es [N]o [C]ancel "); do{ key = toupper (getch()); while ( ("YNC", key) == NULL); YNC string 11 char name[40][20]; strcpy(name[0],"chan tai man"); // string copy gets(name[2]); scanf ("%s",name[2]); for (i=0;i<40;i++) (name[i]); // 40 for (i=0;i<40;i++) (name[i]); // 40 for (i=0;i<40;i++) puts (name ); // 40 string 12

87 char school[7] = "ABLMCC"; for (i=0; i<strlen(school); (school) i++) printf ("% \n", school ); char dow [4] ={"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" A B L M C C school[0] school[5] for (i=0;i<7;i++) printf ("% \n", dow ); string Sun Mon Tue Wed Thu Fri Sat dow[0] dow[6] 13 school[0] "" char school[7] = "ABLMCC"; school[5] 6 'A',,'C' dow[6][0] dow[6][1] dow[6][2] char dow[7][4] ={"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"; dow[0] dow[4] dow[6] string 14

88 char s[13] ="chan tai man"; s = toupper (s); for (i=0; i<12; i++) = toupper ( ); s[0] = toupper (s[0]); = toupper ( ); s[10] = toupper (s[10]); s[11] = toupper (s[11]); ( ) printf ("%s\n", s); CHAN TAI MAN string printf ("%s\n", (s) ); printf ("%s\n", (s) ); printf ( %s\n, (s) ); // upper // lower // reverse 15 string char cno[5] ="1A01", t[3]="99"; gets (cno); ok=0; if ( (cno)==4){ ok=1; if ( cno[0]<'1' cno[1] cno[2] if (ok==1){ strncpy(t, ); n = atoi(t); // if ( ) ok=0; if (ok==0) printf("error\n"); ) ok=0; 16

89 char idno[11] ="A123456(7)"; gets (idno); ok=0; if ( ==10 && idno[0]>= && idno[0]<= ){ ok=1; for (i=1; ; i++) if ( ) ok=0; if (! ( ok=0; ) ) if (ok==0) printf("error\n"); string 17 char idno[11] ="A123456(7)"; gets (idno); sum=58*9 + ( )*8 ; for (i=1; i<7; i++) sum += if (idno[8]=='a') else string sum += (idno[1] )* 7; sum += (idno[2] )* 6; sum += (idno[5] )* 3; sum += (idno[6] )* 2; if (sum ) printf ("Valid\n"); else printf ("Invalid\n"); printf("%s", ); idno idno+1 idno+2 printf("%c", ); idno[0] idno[1] printf("%i", ); idno[0] idno[1] 18

90 7. : (b) Q: Enter text: Chan Tai Man A: 12 char, 4 vowels, 2 spaces : Q: Enter text: A: Bye (c) Q: Enter text: Chan Tai Man A: ChanTaiMan : Q: Enter text: A: Bye (a) Q: Enter text: Chan Tai Man Q: n=? 2 A: s[2] = 'a', "Ch" : s[2]='\0'; Chan Tai Man han Tai Man an Tai Man n Tai Man C H A N C H A N string : (a) Q: Enter Name: Chan A: You are Chan : Q: Enter Name: QUIT A: Bye (c) Q: Enter alphabet: D No.of letters: 5 A: DEFGH (b) Q: Enter password: 1314 A: Incorrect! : Q: Enter password: axe A: correct! (d) n = posn ("banana", "ana"); issym = symmetric ("ana"); issym = symmetric ("bana"); palindrome ("abc", s); palindrome ("cba", s); n = anagram ("act", "cat"); string 20

Microsoft PowerPoint - 20-string-s.pptx

Microsoft PowerPoint - 20-string-s.pptx String 1 String/ 1.: char s1[10]; char *s2; char s3[] = "Chan Tai Man"; char s4[20] = "Chan Siu Ming"; char s5[]={'h','e','l','l','o','\0'; 0 1 2 3 4 5 6 7 8 9 10 11 12 s3 C h a n T a i \0 M a n \0 printf

More information

新・明解C言語入門編『索引』

新・明解C言語入門編『索引』 !... 75!=... 48 "... 234 " "... 9, 84, 240 #define... 118, 213 #include... 148 %... 23 %... 23, 24 %%... 23 %d... 4 %f... 29 %ld... 177 %lf... 31 %lu... 177 %o... 196 %p... 262 %s... 242, 244 %u... 177

More information

Microsoft Word - C-pgm-ws2010.doc

Microsoft Word - C-pgm-ws2010.doc Information and Communication Technology 資訊與通訊科技 Loops (while/for) C 廻路 姓名 : 班別 : ( ) CS C Programming #1 Functions 函數 : 1 若 n=14, 求以下表示式的值 Expressions 表示式 Value 值 Expressions 表示式 Value 值 A 20 2 * (n /

More information

C

C C 2017 4 1 1. 2. while 3. 4. 5. for 6. 2/161 C 7. 8. (do while) 9. 10. (nested loop) 11. 12. 3/161 C 1. I 1 // summing.c: 2 #include 3 int main(void) 4 { 5 long num; 6 long sum = 0L; 7 int status;

More information

C/C++ 语言 - 循环

C/C++ 语言 - 循环 C/C++ Table of contents 7. 1. 2. while 3. 4. 5. for 6. 8. (do while) 9. 10. (nested loop) 11. 12. 13. 1 // summing.c: # include int main ( void ) { long num ; long sum = 0L; int status ; printf

More information

untitled

untitled 不 料 料 例 : ( 料 ) 串 度 8 年 數 串 度 4 串 度 數 數 9- ( ) 利 數 struct { ; ; 數 struct 數 ; 9-2 數 利 數 C struct 數 ; C++ 數 ; struct 省略 9-3 例 ( 料 例 ) struct people{ char name[]; int age; char address[4]; char phone[]; int

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 177 [P179] (1) - [P181] [P182] (2) - for [P183] (3) - switch [P184] [P187] [P189] [P194] 178 [ ]; : : int var; : int var[3]; var 2293620 var[0] var[1] 2293620

More information

untitled

untitled Introduction to Programming ( 數 ) Lecture 3 Spring 2005 March 4, 2005 Lecture 2 Outline 數 料 If if 狀 if 2 (Standard Output, stdout): 料. ((Standard Input, stdin): 料. 類 數 數 數 說 printf 見 數 puts 串 數 putchar

More information

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023)

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023) ( CIP) /. :, 2005. 2 ( ) ISBN 7-5624-3339-9.......... TP311. 1 CIP ( 2005) 011794 : : : : * : : 174 ( A ) :400030 : ( 023) 65102378 65105781 : ( 023) 65103686 65105565 : http: / /www. cqup. com. cn : fxk@cqup.

More information

C/C++语言 - C/C++数据

C/C++语言 - C/C++数据 C/C++ C/C++ Table of contents 1. 2. 3. 4. char 5. 1 C = 5 (F 32). 9 F C 2 1 // fal2cel. c: Convert Fah temperature to Cel temperature 2 # include < stdio.h> 3 int main ( void ) 4 { 5 float fah, cel ;

More information

( )

( ) Secondary School Physical Fitness Award Scheme Student s Handbook Jointly Organized By Hong Kong Childhealth Foundation Education Department ( ) Secondary School Physical Fitness Award Scheme Student s

More information

C/C++语言 - 分支结构

C/C++语言 - 分支结构 C/C++ Table of contents 1. if 2. if else 3. 4. 5. 6. continue break 7. switch 1 if if i // colddays.c: # include int main ( void ) { const int FREEZING = 0; float temperature ; int cold_ days

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 49 [P.51] C/C++ [P.52] [P.53] [P.55] (int) [P.57] (float/double) [P.58] printf scanf [P.59] [P.61] ( / ) [P.62] (char) [P.65] : +-*/% [P.67] : = [P.68] : ,

More information

Microsoft Word - 09.數學136-281.docx

Microsoft Word - 09.數學136-281.docx 136. 計 算 梯 型 面 積 (1 分 ) 請 以 JAVA 運 算 式 計 算 下 面 梯 形 面 積, 並 輸 出 面 積 結 果 梯 形 面 積 公 式 為 :( 上 底 + 下 底 ) 高 2 每 一 組 依 序 分 別 輸 入 梯 形 的 上 底 下 底 及 高 的 整 數 輸 出 梯 形 面 積 輸 入 輸 出 94 190 120 99 54 47 137. 計 算 三 角 形 面

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 9 [P.11] : Dev C++ [P.12] : http://c.feis.tw [P.13] [P.14] [P.15] [P.17] [P.23] Dev C++ [P.24] [P.27] [P.34] C / C++ [P.35] 10 C / C++ C C++ C C++ C++ C ( ) C++

More information

新版 明解C++入門編

新版 明解C++入門編 511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,

More information

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更 AX5000 Version 1.0 2006 年 9 錄...1 說...2 說...3...4 說...5 六...6 6.1 率...7 6.2 POST PAY...8 6.3 PREPAY DEPOSIT...9 6.4...10 6.5...11 更...12...12 LCD IC LED Flash 更 兩 RJ11 ( ) DC ON OFF ON 狀 狀 更 OFF 復 狀 說

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

untitled

untitled A, 3+A printf( ABCDEF ) 3+ printf( ABCDEF ) 2.1 C++ main main main) * ( ) ( ) [ ].* ->* ()[] [][] ** *& char (f)(int); ( ) (f) (f) f (int) f int char f char f(int) (f) char (*f)(int); (*f) (int) (

More information

C 1

C 1 C homepage: xpzhangme 2018 5 30 C 1 C min(x, y) double C // min c # include # include double min ( double x, double y); int main ( int argc, char * argv []) { double x, y; if( argc!=

More information

一 課 後 社 團 名 稱 :B02. 直 排 輪 校 隊 C 班 ( 校 隊 班 ) 二 授 課 教 師 : 劉 輔 人 助 教 : 杜 翊 嘉 2011 2013 世 界 盃 滑 輪 溜 冰 錦 標 賽 世 界 冠 軍 榮 獲 VOUGE 時 尚 雜 誌 專 訪 同 週 一 校 隊 班 介 紹

一 課 後 社 團 名 稱 :B02. 直 排 輪 校 隊 C 班 ( 校 隊 班 ) 二 授 課 教 師 : 劉 輔 人 助 教 : 杜 翊 嘉 2011 2013 世 界 盃 滑 輪 溜 冰 錦 標 賽 世 界 冠 軍 榮 獲 VOUGE 時 尚 雜 誌 專 訪 同 週 一 校 隊 班 介 紹 一 課 後 社 團 名 稱 :B01. 直 排 輪 綜 合 B 班 ( 綜 合 班 ) 二 授 課 教 師 : 郭 佳 佩 助 教 : 同 週 一 校 隊 B 班 介 紹 同 週 一 綜 合 A 班 第 1 週 同 週 一 綜 合 A 班 第 2 週 同 週 一 綜 合 A 班 第 3 週 同 週 一 綜 合 A 班 第 4 週 同 週 一 綜 合 A 班 第 5 週 同 週 一 綜 合 A 班 第

More information

Ps22Pdf

Ps22Pdf C ( CIP) C /. :, 2001. 7 21 ISBN 7-5624 -2355-5. C........ C. TP312 CIP ( 2001 ) 034496 C * * : 7871092 1 /16 : 14. 25 : 356 20017 1 20017 1 : 1 6 000 ISBN 7-5624-2355-5 / TP311 : 21. 00 C, C,,,, C,, (

More information

Microsoft Word - Final Exam Review Packet.docx

Microsoft Word - Final Exam Review Packet.docx Do you know these words?... 3.1 3.5 Can you do the following?... Ask for and say the date. Use the adverbial of time correctly. Use Use to ask a tag question. Form a yes/no question with the verb / not

More information

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc 2 5 8 11 0 13 1. 13 2. 15 3. 18 1 23 1. 23 2. 26 3. 28 2 36 1. 36 2. 39 3. 42 4. 44 5. 49 6. 51 3 57 1. 57 2. 60 3. 64 4. 66 5. 70 6. 75 7. 83 8. 85 9. 88 10. 98 11. 103 12. 108 13. 112 4 115 1. 115 2.

More information

Front 2 Polar F11 ( ) : Polar F11 Polar F11 Polar F11 Polar (Keeps U Fit - Own Workout Program) Polar Polar F11 Polar F11 Polar F11 Polar (

Front 2 Polar F11 ( ) : Polar F11 Polar F11 Polar F11 Polar (Keeps U Fit - Own Workout Program) Polar Polar F11 Polar F11 Polar F11 Polar ( Front 1 - Polar F11 Light OK Back Front 2 Polar F11 ( ) : Polar F11 Polar F11 Polar F11 Polar (Keeps U Fit - Own Workout Program) Polar Polar F11 Polar F11 Polar F11 Polar (www.polarfitnesstrainer.com)

More information

Viu_Cover

Viu_Cover November 2016 Program Highlights G1 1O1O 1O G1 V Henry Chan show (Hidy) Charlene Houghton MMA G-1 G-1 # 11 7-8 22:00-23:00 260 * $380,000 * $185,000 ViuTV (Advance Commitment Scheme) # 10 22-11 13 22:30-23:30

More information

Microsoft Word - ACL chapter02-5ed.docx

Microsoft Word - ACL chapter02-5ed.docx 第 2 章神奇的質數 2.1.1 什麼是質數 1 1 1 打下好基礎 - 程式設計必修的數學思維與邏輯訓練 1 1 0 10 2 3 5 7 4 6 8 9 10 4 10000 1229 1000 168 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131

More information

Microsoft Word - Book9

Microsoft Word - Book9 葬 書 ( 下 ) 佈 陣 十 方 成 立 指 揮 中 心 層 巒 疊 障 千 山 翠 微, 紓 回 連 綿 的 重 山 復 重 山, 侍 朝 衛 迎, 前 後 有 序, 巋 巘 隱 逸 著 一 片 風 水 寶 地, 牛 臥 馬 馳, 鸞 飛 鳳 舞, 滕 蛇 委 蛇, 縈 藟 纏 繞 在 葺 襲 的 斷 續 峰 巒 之 間! 離 正 午 十 二 時 整 還 有 半 個 鐘 頭, 接 近 天 頂 的

More information

(Microsoft Word - 2014-2015\246~\253\327\276\307\256\325\263\370\247i_\252k\271\316\256\325\270\263\267|\263q\271L_2015.11.02_)

(Microsoft Word - 2014-2015\246~\253\327\276\307\256\325\263\370\247i_\252k\271\316\256\325\270\263\267|\263q\271L_2015.11.02_) 仁 愛 堂 田 家 炳 小 學 學 校 報 告 2014-2015 年 度 1 仁 愛 堂 田 家 炳 小 學 2014-2015 年 度 周 年 校 務 報 告 目 錄 ( 一 ) 我 們 的 學 校 P.3 ( 二 ) 關 注 事 項 的 成 就 與 反 思 P.10 ( 三 ) 我 們 的 學 與 教 P.13 ( 四 ) 我 們 對 學 生 成 長 的 支 援 P.14 ( 五 ) 學 生

More information

說 明, 成 個 體 統 才 是! 你 痰 迷 了 心, 脂 油 蒙 了 竅, 國 孝 家 孝 兩 重 在 身, 就 把 個 人 送 來 了 這 會 子 被 人 家 告 我 們, 我 又 是 個 沒 腳 蟹, 連 官 場 中 都 知 道 我 利 害 吃 醋, 如 今 指 名 提 我, 要 休 我,

說 明, 成 個 體 統 才 是! 你 痰 迷 了 心, 脂 油 蒙 了 竅, 國 孝 家 孝 兩 重 在 身, 就 把 個 人 送 來 了 這 會 子 被 人 家 告 我 們, 我 又 是 個 沒 腳 蟹, 連 官 場 中 都 知 道 我 利 害 吃 醋, 如 今 指 名 提 我, 要 休 我, 國 文 91 年 學 科 能 力 測 驗 總 分 班 級 : / 座 號 : / 姓 名 : 第 壹 部 分 : 選 擇 題 ( 占 54 分 ) 一 單 一 選 擇 題 ( 占 36 分 ) 說 明 : 第 1 題 至 第 18 題, 每 題 選 出 一 個 最 適 當 的 選 項, 標 示 在 答 案 卡 之 選 擇 題 答 案 區 每 題 答 對 得 2 分, 答 錯 不 倒 扣 ( )1.

More information

Untitiled

Untitiled 目 立人1 2011 录 目 录 专家视点 权利与责任 班主任批评权的有效运用 齐学红 3 德育园地 立 沿着鲁迅爷爷的足迹 主题队活动案例 郑海娟 4 播下一颗美丽的种子 沿着鲁迅爷爷的足迹 中队活动反思 郑海娟 5 赠人玫瑰 手有余香 关于培养小学生服务意识的一些尝试和思考 孙 勤 6 人 教海纵横 2011 年第 1 期 总第 9 期 主办单位 绍兴市鲁迅小学教育集团 顾 问 编委会主任 编

More information

untitled

untitled 數 Quadratic Equations 數 Contents 錄 : Quadratic Equations Distinction between identities and equations. Linear equation in one unknown 3 ways to solve quadratic equations 3 Equations transformed to quadratic

More information

nooog

nooog C : : : , C C,,, C, C,, C ( ), ( ) C,,, ;,, ; C,,, ;, ;, ;, ;,,,, ;,,, ; : 1 9, 2 3, 4, 5, 6 10 11, 7 8, 12 13,,,,, 2008 1 1 (1 ) 1.1 (1 ) 1.1.1 ( ) 1.1.2 ( ) 1.1.3 ( ) 1.1.4 ( ) 1.1.5 ( ) 1.2 ( ) 1.2.1

More information

致遠管理學院法規提案單

致遠管理學院法規提案單 台 灣 首 府 大 學 101 學 年 度 第 2 學 期 第 1 次 行 政 會 議 會 議 議 程 會 議 資 料 請 先 行 參 閱 為 方 便 討 論, 請 於 開 會 當 日 攜 帶 與 會, 謝 謝 您 的 合 作 若 不 克 與 會, 請 於 事 前 告 知 承 辦 人 ( 分 機 215 詹 琬 渝 ) 會 議 時 間 : 民 國 102 年 2 月 6 日 ( 星 期 三 ) 下

More information

FY.DOC

FY.DOC 高 职 高 专 21 世 纪 规 划 教 材 C++ 程 序 设 计 邓 振 杰 主 编 贾 振 华 孟 庆 敏 副 主 编 人 民 邮 电 出 版 社 内 容 提 要 本 书 系 统 地 介 绍 C++ 语 言 的 基 本 概 念 基 本 语 法 和 编 程 方 法, 深 入 浅 出 地 讲 述 C++ 语 言 面 向 对 象 的 重 要 特 征 : 类 和 对 象 抽 象 封 装 继 承 等 主

More information

_汪_文前新ok[3.1].doc

_汪_文前新ok[3.1].doc 普 通 高 校 本 科 计 算 机 专 业 特 色 教 材 精 选 四 川 大 学 计 算 机 学 院 国 家 示 范 性 软 件 学 院 精 品 课 程 基 金 青 年 基 金 资 助 项 目 C 语 言 程 序 设 计 (C99 版 ) 陈 良 银 游 洪 跃 李 旭 伟 主 编 李 志 蜀 唐 宁 九 李 涛 主 审 清 华 大 学 出 版 社 北 京 i 内 容 简 介 本 教 材 面 向

More information

Microsoft Word - 2007-08¾Ç®Õ©P¦~³ø§i.doc

Microsoft Word - 2007-08¾Ç®Õ©P¦~³ø§i.doc 沙 田 蘇 浙 公 學 學 校 周 年 報 告 ( 二 七 至 二 八 學 年 ) 學 校 報 告 的 主 要 內 容 學 校 資 料 校 訓 辦 學 宗 旨 及 方 針 校 史 學 校 設 施 及 資 源 學 校 近 況 熱 心 公 益, 回 饋 社 會 傳 媒 報 道 專 業 發 展, 自 我 完 善 課 程 改 革, 教 師 培 訓, 加 強 溝 通, 順 利 過 渡 新 高 中 學 制 齊

More information

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2 Chapter 02 變數與運算式 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.2 2.2.1 2.2.2 2.2.3 type 2.2.4 2.3 2.3.1 print 2.3.2 input 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 + 2.4.6 Python Python 2.1 2.1.1 a p p l e b e a r c 65438790

More information

3.1 num = 3 ch = 'C' 2

3.1 num = 3 ch = 'C' 2 Java 1 3.1 num = 3 ch = 'C' 2 final 3.1 final : final final double PI=3.1415926; 3 3.2 4 int 3.2 (long int) (int) (short int) (byte) short sum; // sum 5 3.2 Java int long num=32967359818l; C:\java\app3_2.java:6:

More information

Viu_Cover

Viu_Cover January 2017 Program Highlights SE7EN 2 SE7EN 2 (Colin)(Thor) (Hailey)(Dixon) (Renci) (Hidy) # 1 7-3 11 21:30-22:30 960 * $598,000 * $280,000 179 seven SE7EN7 A320 100 SE7EN ViuTV (Advance Commitment Scheme)

More information

Ps22Pdf

Ps22Pdf ( 98 ) C ( ) ( )158 1998 C : C C C,,, C,, : C ( ) : : (, 100084) : : : 7871092 1/ 16 :18 25 :415 : 2000 3 1 2000 3 1 : ISBN 7 302 01166 4/ T P432 : 00016000 : 22 00 ( 98 ) 20 90,,, ;,,, 1994, 1998, 160,

More information

1 2005 9 2005,,,,,,,,,, ( http: \ \ www. ncre. cn,, ) 30,,,,,,,, C : C : : 19 : 100081 : : 7871092 1 /16 : 8. 75 : 96 : 2005 11 1 : 2005 11 1 : ISBN 7

1 2005 9 2005,,,,,,,,,, ( http: \ \ www. ncre. cn,, ) 30,,,,,,,, C : C : : 19 : 100081 : : 7871092 1 /16 : 8. 75 : 96 : 2005 11 1 : 2005 11 1 : ISBN 7 1 2005 9 2005,,,,,,,,,, ( http: \ \ www. ncre. cn,, ) 30,,,,,,,, C : C : : 19 : 100081 : : 7871092 1 /16 : 8. 75 : 96 : 2005 11 1 : 2005 11 1 : ISBN 7-80097 - 564-9 /TP 8 : 10. 00 ,,,, 1994 NCRE,,, ( ),,,,,

More information

2013 C 1 # include <stdio.h> 2 int main ( void ) 3 { 4 int cases, a, b, i; 5 scanf ("%d", & cases ); 6 for (i = 0;i < cases ;i ++) 7 { 8 scanf ("%d %d

2013 C 1 # include <stdio.h> 2 int main ( void ) 3 { 4 int cases, a, b, i; 5 scanf (%d, & cases ); 6 for (i = 0;i < cases ;i ++) 7 { 8 scanf (%d %d 2013 18 ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp, Compilation Error cin scanf Time Limit Exceeded 1: A 5 B 5 C 5 D 5 E 5 F 5 1 2013 C 1 # include 2 int main ( void ) 3 { 4 int cases, a, b,

More information

untitled

untitled 1 Outline 流 ( ) 流 ( ) 流 ( ) 流 ( ) 流 ( ) 狀 流 ( ) 利 來 行流 if () 立 行 ; else 不 立 行 ; 例 sample2-a1 (1) 列 // 料 Console.Write(""); string name = Console.ReadLine(); Console.WriteLine(" " + name + "!!"); 例 sample2-a1

More information

Microsoft Word - (web)_F.1_Notes_&_Application_Form(Chi)(non-SPCCPS)_16-17.doc

Microsoft Word - (web)_F.1_Notes_&_Application_Form(Chi)(non-SPCCPS)_16-17.doc 聖 保 羅 男 女 中 學 學 年 中 一 入 學 申 請 申 請 須 知 申 請 程 序 : 請 將 下 列 文 件 交 回 本 校 ( 麥 當 勞 道 33 號 ( 請 以 A4 紙 張 雙 面 影 印, 並 用 魚 尾 夾 夾 起 : 填 妥 申 請 表 並 貼 上 近 照 小 學 五 年 級 上 下 學 期 成 績 表 影 印 本 課 外 活 動 表 現 及 服 務 的 證 明 文 件 及

More information

例 度 讀 讀 不 不 來 念 來 了 讀 不 不 讀 不 讀行 利 了 說 更 了 讀

例 度 讀 讀 不 不 來 念 來 了 讀 不 不 讀 不 讀行 利 了 說 更 了 讀 讀 爛 來 都 力 讀 不 讀 了 讀 來 讀 了 更 不 都 六年 類 更 錄 不 都 便 路 不 不 了 讀 來不 讀 讀 刺 數 不 刺 讀 索 料 易 力 練 讀 易 料 了 讀 力 讀便不 讀 例 度 讀 讀 不 不 來 念 來 了 讀 不 不 讀 不 讀行 利 了 說 更 了 讀 年 來 句 易 說 說 易 說 讀 識 識 力 句 老 錄 朗讀 讀 了 易 臨 說讀 力 識 樂 參 練

More information

01

01 Web: www.wjsfedu.com 01 www.wjsfedu.com 02 03 www.wjsfedu.com 04 2 Daily Schedule 7/26 Tue Day 3 7/27 Wed Day 4 7/28 Thu 7/25 Mon Day 2 Day 5 7/24 Sun Day 1 7 7/29 Fri Day 6 7/30 Sat Day 7 05 7/31 Sun

More information

Sea of Japan Hokkaido Okhotsk Sea Study area Number of fish released (thousand) 120,000 100,000 80,000 60,000 40,000 20,000 0 1991 1993 1995 1997 1999 2001 Year Fish released in rivers Fish released from

More information

桃園縣南美國民小學102學年度學校課程計畫

桃園縣南美國民小學102學年度學校課程計畫 桃 園 縣 南 美 國 民 小 學 02 學 年 度 學 校 課 程 計 畫 壹 依 據 一 教 部 國 民 中 小 學 九 年 一 貫 課 程 綱 要 (92.0.5 台 國 字 第 092006026 號 函 ) 二 95.05.24 台 國 ( 二 ) 字 第 0950075748B 號 令 修 正 第 伍 點 ( 學 習 領 域 ) 第 陸 點 ( 實 施 要 點 ) 三 教 部 97 年

More information

Microsoft Word - Array-Exercise.doc

Microsoft Word - Array-Exercise.doc 1. 試寫 C 句子 讓使用者輸入日期, 驗證使用者是否輸入正確, 輸出日數 [20 分 ] 執行畫面 使用者輸入 指示 : Q: 日期 (mm dd)? 13 10 A: 輸入錯誤! Q: 日期 (mm dd)? 2 30 A: 輸入錯誤! Q: 日期 (mm dd)? 3 10 A: 1 月 1 日至 3 月 10 日, 請宣告變數 : mm, dd, ndays 若輸入錯誤數字, 則顯示錯誤訊息

More information

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc References (Section 5.2) Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 15-16, 2010 H.-T. Lin (NTU CSIE) References OOP 03/15-16/2010 0 / 22 Fun Time (1) What happens in memory? 1 i n t i ; 2

More information

Microsoft Word - chap13.doc

Microsoft Word - chap13.doc ï FILE dã Ä o rô qî ô Ö ƒù å o ô ÃÓ FILE Ã Ù Ö o v-> ª w ï FILE d wã +1 ~ c:\temp w Õx test.dat Ã Û vä à n ïw à test.dat 13-2a /* File name: ex13-2a.c */ #include char ch; fptr = fopen("c:\\temp\\test.dat",

More information

84 針 藥 併 施 治 療 偏 頭 痛 次 發 作 症 狀 為 左 顳 側 頭 脹 痛, 多 為 夜 間 發 作 影 響 睡 眠 或 工 作, 頻 率 為 一 天 發 作 一 次, 持 續 一 至 二 小 時, 疼 痛 指 數 7 分 (0 分 為 不 痛, 最 痛 為 滿 分 10 分 ), 需

84 針 藥 併 施 治 療 偏 頭 痛 次 發 作 症 狀 為 左 顳 側 頭 脹 痛, 多 為 夜 間 發 作 影 響 睡 眠 或 工 作, 頻 率 為 一 天 發 作 一 次, 持 續 一 至 二 小 時, 疼 痛 指 數 7 分 (0 分 為 不 痛, 最 痛 為 滿 分 10 分 ), 需 J Chin Med 26(1): 83-91, 2015 DOI: 10.3966/101764462015062601008 83 針 藥 併 施 治 療 偏 頭 痛 經 驗 - 病 例 報 告 1, 眞 # 1, #, * 1, 2 1, 2 1 高 雄 長 庚 紀 念 醫 院 中 醫 科 系, 高 雄, 台 灣 2 長 庚 大 學 中 醫 系, 桃 園, 台 灣 103 12 26 104

More information

C 1 # include <stdio.h> 2 int main ( void ) { 4 int cases, i; 5 long long a, b; 6 scanf ("%d", & cases ); 7 for (i = 0;i < cases ;i ++) 8 { 9

C 1 # include <stdio.h> 2 int main ( void ) { 4 int cases, i; 5 long long a, b; 6 scanf (%d, & cases ); 7 for (i = 0;i < cases ;i ++) 8 { 9 201 201 21 ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp Compilation Error long long cin scanf Time Limit Exceeded 1: A 1 B 1 C 5 D RPG 10 E 10 F 1 G II 1 1 201 201 C 1 # include 2 int main ( void

More information

Progperl.PDF

Progperl.PDF print "Howdy, world!\n"; 1 2 / / 3 4 / $phrase = " Howdy, world!\n"; print $phrase ; # # / 5 6 / $answer = 42; $pi = 3.14159265; $avocados = 6.02e23; $pet = "Camel"; $sign = "I love my $pet"; $cost = 'It

More information

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit 6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C51 6.1 C51 6.1.1 C51 C51 ANSI C MCS-51 C51 ANSI C C51 6.1 6.1 C51 bit Byte bit sbit 1 0 1 unsigned char 8 1 0 255 Signed char 8 11 128

More information

( 表 1) 學 校 基 本 資 料 學 校 類 型 新 竹 市 東 區 新 竹 國 小 班 級 數 55 校 址 新 竹 市 興 學 街 106 號 電 話 傳 真 網 址

( 表 1) 學 校 基 本 資 料 學 校 類 型 新 竹 市 東 區 新 竹 國 小 班 級 數 55 校 址 新 竹 市 興 學 街 106 號 電 話 傳 真 網 址 學 校 課 程 計 畫 備 查 項 目 及 表 格 新 竹 市 104 學 年 度 新 竹 國 小 課 程 計 畫 備 查 項 目 壹 學 校 課 程 發 展 與 規 劃 一 學 校 課 程 計 畫 通 過 課 程 發 展 委 員 會 審 核 之 日 期 ( 含 會 議 記 錄, 簽 到 單 ) 二 學 校 基 本 資 料 ( 表 1) 三 學 校 背 景 分 析 ( 可 自 訂 格 式, 表 2

More information

科学计算的语言-FORTRAN95

科学计算的语言-FORTRAN95 科 学 计 算 的 语 言 -FORTRAN95 目 录 第 一 篇 闲 话 第 1 章 目 的 是 计 算 第 2 章 FORTRAN95 如 何 描 述 计 算 第 3 章 FORTRAN 的 编 译 系 统 第 二 篇 计 算 的 叙 述 第 4 章 FORTRAN95 语 言 的 形 貌 第 5 章 准 备 数 据 第 6 章 构 造 数 据 第 7 章 声 明 数 据 第 8 章 构 造

More information

1-S40A...-1 DAT00452 V.005

1-S40A...-1 DAT00452 V.005 1. 1-S40A -1 Technical data: DATA SHEET Technical data Unit 1-S40A -1 OIML R60 D1 C3 Emax Max. capacity Kg 50,100,200,500 50,100,200,500 t 1, 2, 3, 5 1, 2, 3, 5 vmin % of Cn 0.0286 0.0120 Sensitivity mv/v

More information

untitled

untitled 說 參 例 邏 邏 1. 說 2. 數 數 3. 8 4. 理念 李 龍老 立 1. 理 料 2. 理 料 3. 數 料 4. 流 邏 念 5. 良 6. 讀 行 行 7. 行 例 來 邏 1. 說 說 識 量 2. 說 理 類 3. 數 數 念 4. 令 5. 良 6. 流 邏 念 7. 說 邏 理 力 1. 2. 3. 4. 5. 列 念 1 參 1. ( Visual Basic 例 ) (1)

More information

<4D6963726F736F667420576F7264202D20B6B3AA4CBFA43938A67EABD7BAEBB669B1D0AE76BDD2B0F3B1D0BEC7AFE0A44FAD5EBB79B1D0AED72E646F63>

<4D6963726F736F667420576F7264202D20B6B3AA4CBFA43938A67EABD7BAEBB669B1D0AE76BDD2B0F3B1D0BEC7AFE0A44FAD5EBB79B1D0AED72E646F63> 雲 林 縣 98 年 度 精 進 教 師 課 堂 教 學 能 力 優 良 教 學 範 例 甄 選 曁 觀 摩 教 學 演 示 甄 選 活 動 英 語 文 領 域 教 學 活 動 設 計 ( 教 案 範 例 格 式 - 用 英 文 繕 寫 ) 2nd period of this lesson Topic Home Run Class Fifth Grade Class B Teaching Material

More information

2013 C 1 #include <stdio.h> 2 int main(void) 3 { 4 int cases, i; 5 long long a, b; 6 scanf("%d", &cases); 7 for (i = 0; i < cases; i++) 8 { 9 scanf("%

2013 C 1 #include <stdio.h> 2 int main(void) 3 { 4 int cases, i; 5 long long a, b; 6 scanf(%d, &cases); 7 for (i = 0; i < cases; i++) 8 { 9 scanf(% 2013 ( 28 ) ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp Compilation Error long long cin scanf Time Limit Exceeded 1: A 10 B 1 C 1 D 5 E 5 F 1 G II 5 H 30 1 2013 C 1 #include 2 int main(void) 3

More information

勤 學 * 卓 越 * 快 樂 成 長 本 校 在 老 師 群 策 群 力 共 同 討 論 下, 型 塑 了 學 校 願 景 : 勤 學 卓 越 快 樂 成 長 ( 一 ) 勤 學 運 用 真 的 力 量 培 養 勤 學, 以 語 文 教 為 基 礎 紮 根 ( 二 ) 卓 越 利 用 美 的 感

勤 學 * 卓 越 * 快 樂 成 長 本 校 在 老 師 群 策 群 力 共 同 討 論 下, 型 塑 了 學 校 願 景 : 勤 學 卓 越 快 樂 成 長 ( 一 ) 勤 學 運 用 真 的 力 量 培 養 勤 學, 以 語 文 教 為 基 礎 紮 根 ( 二 ) 卓 越 利 用 美 的 感 桃 園 市 復 旦 國 民 小 學 104 學 年 度 學 校 課 程 計 畫 壹 依 據 貳 目 的 一 教 基 本 法 第 13 條, 國 民 教 法 第 4 條 二 教 部 92 公 佈 之 國 民 中 小 學 九 年 一 貫 課 程 綱 要 三 桃 園 市 政 府 推 動 國 民 中 小 學 九 年 一 貫 課 程 實 施 計 畫 四 桃 園 市 政 府 97.5.29 府 教 數 字 第

More information

Microsoft Word - 财务d08z.doc

Microsoft Word - 财务d08z.doc 版 权 所 有 侵 权 必 究 图 书 在 版 编 目 (CIP) 数 据 用 好 Excel(2007 版 ): 财 务 篇 / 王 维, 云 大 勇 编 著. 北 京 : 中 国 宇 航 出 版 社,2007.5 ( 时 尚 IT 生 活 秀 ) ISBN 978-7-80218-208-0 Ⅰ. 用 Ⅱ.1 王 2 云 Ⅲ. 电 子 表 格 系 统,Excel Ⅳ.TP391.13 中 国 版

More information

Design of Experiments DOE 1. (Design of Experiments) (Designed Experiments), , 1-1 Input ; Output ; Controllable input factors X1,X2,,Xp; Uncon

Design of Experiments DOE 1. (Design of Experiments) (Designed Experiments), , 1-1 Input ; Output ; Controllable input factors X1,X2,,Xp; Uncon Design of Experiments DOE DOE- 1 Design of Experiments DOE 1. (Design of Experiments) (Designed Experiments), 1-1 1-1, 1-1 Input ; Output ; Controllable input factors X1,X2,,Xp; Uncontrollable input factors

More information

2015年计算机二级(C语言)模拟试题及答案(四)

2015年计算机二级(C语言)模拟试题及答案(四) 2016 年 计 算 机 二 级 (C 语 言 ) 模 拟 试 题 及 答 案 (4) 一 填 空 题 1 C 语 言 中 基 本 的 数 据 类 型 有 : 2 C 语 言 中 普 通 整 型 变 量 的 类 型 说 明 符 为, 在 内 存 中 占 字 节, 有 符 号 普 通 整 型 的 数 据 范 围 是 3 整 数 -35 在 机 内 的 补 码 表 示 为 4 执 行 下 列 语 句 int

More information

<4D6963726F736F667420506F776572506F696E74202D2032303136A4A4A4BBA4E5BECCB8D5A5FEA7F0B2A4205BACDBAE65BCD2A6A15D>

<4D6963726F736F667420506F776572506F696E74202D2032303136A4A4A4BBA4E5BECCB8D5A5FEA7F0B2A4205BACDBAE65BCD2A6A15D> 文 憑 試 全 攻 略 甲 勵 志 篇 -- 我 要 讀 書 喇! 大 學 畢 業 生 有 較 佳 出 路 8416 10076 11823 +19% +28% +111% 統 計 署 2011 人 口 普 查 結 果 http://www.censtatd.gov.hk/filemanager/en/content_1149/t05_07_07a.xls 在 香 港 入 大 學 競 爭 激 烈 1.

More information

Microsoft Word - 1041106

Microsoft Word - 1041106 輔 仁 大 學 經 費 核 銷 作 業 須 知 中 華 民 國 一 百 零 四 年 八 月 目 錄 一 報 帳 流 程... 3 二 憑 證 種 類 及 內 容... 7 三 憑 證 範 例... 10 四 經 費 核 銷 要 點... 15 五 常 見 錯 誤... 18 六 相 關 法 規... 19 輔 仁 大 學 預 算 執 行 辦 法... 20 輔 仁 大 學 採 購 作 業 辦 法...

More information

四川省普通高等学校

四川省普通高等学校 四 川 省 普 通 高 等 学 校 计 算 机 应 用 知 识 和 能 力 等 级 考 试 考 试 大 纲 (2013 年 试 行 版 ) 四 川 省 教 育 厅 计 算 机 等 级 考 试 中 心 2013 年 1 月 目 录 一 级 考 试 大 纲 1 二 级 考 试 大 纲 6 程 序 设 计 公 共 基 础 知 识 6 BASIC 语 言 程 序 设 计 (Visual Basic) 9

More information

Microsoft Word - 苹果脚本跟我学.doc

Microsoft Word - 苹果脚本跟我学.doc AppleScript for Absolute Starters 2 2 3 0 5 1 6 2 10 3 I 13 4 15 5 17 6 list 20 7 record 27 8 II 32 9 34 10 36 11 44 12 46 13 51 14 handler 57 15 62 63 3 AppleScript AppleScript AppleScript AppleScript

More information

Microsoft Word - CPE考生使用手冊160524.docx

Microsoft Word - CPE考生使用手冊160524.docx 大 學 程 式 能 力 檢 定 (CPE) 考 生 使 用 手 冊 2016 年 5 月 24 日 這 份 手 冊 提 供 給 參 加 CPE 檢 定 考 試 的 考 生 內 容 包 含 考 試 環 境 的 使 用, 以 及 解 題 時 所 使 用 I/O 的 基 本 知 識 1. 如 欲 報 名 參 加 CPE 考 試, 請 先 於 CPE 網 站 完 成 帳 號 註 冊, 然 後 再 報 名 該

More information

<4D6963726F736F667420576F7264202D20433135323120A6B3C3F6BEC7AED5B0B2B4C1A142A4A4A440A6DCA4A4A4ADAFC5B2C4A440BEC7B4C1A6D2B8D5AEC9B6A1A8C6A979>

<4D6963726F736F667420576F7264202D20433135323120A6B3C3F6BEC7AED5B0B2B4C1A142A4A4A440A6DCA4A4A4ADAFC5B2C4A440BEC7B4C1A6D2B8D5AEC9B6A1A8C6A979> 11 December, 2015 Dear Parents, School Holidays & S1-S5 1st Term Examination Schedule Circular Number: C1521 Our school s Christmas and New Year Holidays are from 23/12/2015 2/1/2016. On 22 December (Tuesday)

More information

C Programming

C Programming ~ `! 1 2 $ 4 5 ^ 6 7 * 8 ( 9 ) 0 : ; + " ' C 程式編寫 #1 合法的識別字 (Valid identifiers): 免費 IDE 下載 : Code::Block 16 www.codeblocks.org/downloads/binaries/ [33MB] Code::Block-EDU Portable codeblocks.codecutter.org

More information

SDP 1 2 3 4 8 9 10 12 19

SDP 1 2 3 4 8 9 10 12 19 SDP SDP 1 2 3 4 8 9 10 12 19 SDP 2 SDP CANBUS 3m/s 48 1 2 N 3 4 5 6 7 8 9 EMC EMC ENS008212 EN618003 10 IP21 SDP 3 1 1 4 2 5 3 P24 103 104 N24 G24 P24 101 102 N24 G24 J2 J3 n P2 P1 P3 J2 J1 J3 1 P2 P1

More information

比 賽 表 Competition Schedule 報 到 : 比 賽 開 始 前 15 分 鐘 Reporting : 15 minutes before the scheduled time for the match 各 參 賽 隊 伍 必 須 依 照 大 會 編 定 的 出 場 比 賽,

比 賽 表 Competition Schedule 報 到 : 比 賽 開 始 前 15 分 鐘 Reporting : 15 minutes before the scheduled time for the match 各 參 賽 隊 伍 必 須 依 照 大 會 編 定 的 出 場 比 賽, 比 賽 表 Competition Schedule 報 到 : 比 賽 開 始 前 15 分 鐘 Reporting : 15 minutes before the scheduled time for the match 各 參 賽 隊 伍 必 須 依 照 大 會 編 定 的 出 場 比 賽, 每 場 賽 事 於 裁 判 召 集 出 場 5 分 鐘 後 仍 未 能 出 場 作 賽 或 參 2016

More information

epub 33-8

epub 33-8 8 1) 2) 3) A S C I I 4 C I / O I / 8.1 8.1.1 1. ANSI C F I L E s t d i o. h typedef struct i n t _ f d ; i n t _ c l e f t ; i n t _ m o d e ; c h a r *_ n e x t ; char *_buff; /* /* /* /* /* 1 5 4 C FILE

More information

FILTRON 1. DC AC AC 220V 50HZ 2. 1 1 1 3. / / / / 4. 1) 2 3 4 5 6 5. 6. 7. 8. 9. / 10. 1. 2. 3. 4. 5. 6. 7. DC AC FILTRON DC AC FILTRON DC 12V 12VDC D

FILTRON 1. DC AC AC 220V 50HZ 2. 1 1 1 3. / / / / 4. 1) 2 3 4 5 6 5. 6. 7. 8. 9. / 10. 1. 2. 3. 4. 5. 6. 7. DC AC FILTRON DC AC FILTRON DC 12V 12VDC D 2006 4 27 1 JY FILTRON 1. DC AC AC 220V 50HZ 2. 1 1 1 3. / / / / 4. 1) 2 3 4 5 6 5. 6. 7. 8. 9. / 10. 1. 2. 3. 4. 5. 6. 7. DC AC FILTRON DC AC FILTRON DC 12V 12VDC DC FILTRON AC 24VAC 24VAC AC 24VAC AC

More information

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1

, 7, Windows,,,, : ,,,, ;,, ( CIP) /,,. : ;, ( 21 ) ISBN : -. TP CIP ( 2005) 1 21 , 7, Windows,,,, : 010-62782989 13501256678 13801310933,,,, ;,, ( CIP) /,,. : ;, 2005. 11 ( 21 ) ISBN 7-81082 - 634-4... - : -. TP316-44 CIP ( 2005) 123583 : : : : 100084 : 010-62776969 : 100044 : 010-51686414

More information

18 A B S 17.44±1() ±6.26( ) 54.23±5.5( ) 6.42±1.51() m 30m t α =.05 ( )AB 1 5 (p>.05)( )AB 1 5 (p<.05)( )A (p>.05)( )B (p<.05)( )A B

18 A B S 17.44±1() ±6.26( ) 54.23±5.5( ) 6.42±1.51() m 30m t α =.05 ( )AB 1 5 (p>.05)( )AB 1 5 (p<.05)( )A (p>.05)( )B (p<.05)( )A B The Effect of Different Training Method on Quick Coordination ability in High School Female Soccer Players 18 A B S 17.44±1() 161.39±6.26( ) 54.23±5.5( ) 6.42±1.51() 15 60-90 30m 30m t α =.05 ( )AB 1 5

More information

TX-NR3030_BAS_Cs_ indd

TX-NR3030_BAS_Cs_ indd TX-NR3030 http://www.onkyo.com/manual/txnr3030/adv/cs.html Cs 1 2 3 Speaker Cable 2 HDMI OUT HDMI IN HDMI OUT HDMI OUT HDMI OUT HDMI OUT 1 DIGITAL OPTICAL OUT AUDIO OUT TV 3 1 5 4 6 1 2 3 3 2 2 4 3 2 5

More information

第5章修改稿

第5章修改稿 (Programming Language), ok,, if then else,(), ()() 5.0 5.0.0, (Variable Declaration) var x : T x, T, x,,,, var x : T P = x, x' : T P P, () var x:t P,,, yz, var x : int x:=2. y := x+z = x, x' : int x' =2

More information

我的野蛮女友(网络小说)中文版

我的野蛮女友(网络小说)中文版 01-2002-1996 CIP /. 2002.6 ISBN 7801155424/I77 I. II.. IV. I312.645 CIP 2002 033396 20002001 by KimHoSik All rights reserved. This Chinese Edition Published by arrangement with Poem and Society. Through

More information

Microsoft PowerPoint - L17_Inheritance_v4.pptx

Microsoft PowerPoint - L17_Inheritance_v4.pptx C++ Programming Lecture 17 Wei Liu ( 刘 威 ) Dept. of Electronics and Information Eng. Huazhong University of Science and Technology May. 2015 Lecture 17 Chapter 20. Object-Oriented Programming: Inheritance

More information

Microsoft Word - template.doc

Microsoft Word - template.doc HGC efax Service User Guide I. Getting Started Page 1 II. Fax Forward Page 2 4 III. Web Viewing Page 5 7 IV. General Management Page 8 12 V. Help Desk Page 13 VI. Logout Page 13 Page 0 I. Getting Started

More information

mm 400 mm 15 mm EOF mm/10a Fig. 1 Distributions

mm 400 mm 15 mm EOF mm/10a Fig. 1 Distributions 7 2 2011 3 ADVANCES IN CLIMATE CHANGE RESEARCH Vol. 7 No. 2 March 2011 1673-1719 (2011) 02-0097-07 1961 2007 77 5 5 6 2 3 8 11 1980 1980 1990 2015 8 11 P426.6 A 7.86% 4 50 0.35 5 6 19 7 8 9 1 1906 2005

More information

安 全 指 南 : 必 须 遵 守 所 有 的 警 告 事 项, 以 确 保 自 己 和 他 人 的 安 全 以 及 保 护 产 品 和 连 接 装 置 这 些 警 告 事 项 都 按 警 示 程 度 明 示 出 等 级 有 资 格 的 人 员 : YO-YO 只 能 进 行 与 手 册 有 关 的

安 全 指 南 : 必 须 遵 守 所 有 的 警 告 事 项, 以 确 保 自 己 和 他 人 的 安 全 以 及 保 护 产 品 和 连 接 装 置 这 些 警 告 事 项 都 按 警 示 程 度 明 示 出 等 级 有 资 格 的 人 员 : YO-YO 只 能 进 行 与 手 册 有 关 的 IOM LBYM180112 Rev. D Mark-4 /GP-4 Yo-Yo 重 锤 安 装 & 操 作 手 册 安 全 指 南 : 必 须 遵 守 所 有 的 警 告 事 项, 以 确 保 自 己 和 他 人 的 安 全 以 及 保 护 产 品 和 连 接 装 置 这 些 警 告 事 项 都 按 警 示 程 度 明 示 出 等 级 有 资 格 的 人 员 : YO-YO 只 能 进 行 与 手

More information

WARNING RISK OF ELECTRIC SHOCK DO NOT OPEN AVIS RISQUE DE CHOC ELECTRIQUE NE PAS OUVRIR S3125A Ct-2

WARNING RISK OF ELECTRIC SHOCK DO NOT OPEN AVIS RISQUE DE CHOC ELECTRIQUE NE PAS OUVRIR S3125A Ct-2 DR-UN7 Ct WARNING RISK OF ELECTRIC SHOCK DO NOT OPEN AVIS RISQUE DE CHOC ELECTRIQUE NE PAS OUVRIR S3125A...... Ct-2 1 Ct-3 Ct-4 Ct-5 ...2...3...5...5...6...8...10...10...10...11...11...12...13...14...16...18...18...18...19...19

More information

coverage2.ppt

coverage2.ppt Satellite Tool Kit STK/Coverage STK 82 0715 010-68745117 1 Coverage Definition Figure of Merit 2 STK Basic Grid Assets Interval Description 3 Grid Global Latitude Bounds Longitude Lines Custom Regions

More information

pdf

pdf CENTRO 花 甲 老 人 的 for 交 the over 60s 通 travel 证 passes for the over 60s travel passes for the over 60s travel 谢 谢 发 给 我 这 个 交 通 证, travel passes for the over 60s 我 travel 今 passes 年 for 66 the over 岁 60s

More information

Microsoft Word - PHP7Ch01.docx

Microsoft Word - PHP7Ch01.docx PHP 01 1-6 PHP PHP HTML HTML PHP CSSJavaScript PHP PHP 1-6-1 PHP HTML PHP HTML 1. Notepad++ \ch01\hello.php 01: 02: 03: 04: 05: PHP 06:

More information

User ID 150 Password - User ID 150 Password Mon- Cam-- Invalid Terminal Mode No User Terminal Mode No User Mon- Cam-- 2

User ID 150 Password - User ID 150 Password Mon- Cam-- Invalid Terminal Mode No User Terminal Mode No User Mon- Cam-- 2 Terminal Mode No User User ID 150 Password - User ID 150 Password Mon- Cam-- Invalid Terminal Mode No User Terminal Mode No User Mon- Cam-- 2 Mon1 Cam-- Mon- Cam-- Prohibited M04 Mon1 Cam03 Mon1 Cam03

More information

wedding calendar

wedding calendar W TAIPEI PRESENTS YOUR WEDDING YOUR WAY W SELECTED WEDDING DAY W JANUARY FEBRUARY MARCH APRIL 4 5 6 4 5 6 7 7 8 9 10 11 12 13 8 9 10 11 12 13 14 14 15 16 17 18 19 20 15 16 17 18 19 20 21 21 22 23 24 25

More information

GCSE Mathematics Question Paper Unit 2 March 2012

GCSE Mathematics Question Paper Unit 2 March 2012 Centre Number Surname Candidate Number For Examiner s Use Other Names Candidate Signature Examiner s Initials General Certificate of Secondary Education Higher Tier March 2012 Pages 2 3 4 5 Mark Mathematics

More information

WARNING RISK OF ELECTRIC SHOCK DO NOT OPEN AVIS RISQUE DE CHOC ELECTRIQUE NE PAS OUVRIR S35A Ct-

WARNING RISK OF ELECTRIC SHOCK DO NOT OPEN AVIS RISQUE DE CHOC ELECTRIQUE NE PAS OUVRIR S35A Ct- CR-B8 Ct WARNING RISK OF ELECTRIC SHOCK DO NOT OPEN AVIS RISQUE DE CHOC ELECTRIQUE NE PAS OUVRIR S35A...... Ct- Ct-3 Ct-4 3 Ct-5 Ct-6 Ct-7 3 4 5 6 7 8 9 J K L A B C D E F G H I M N O P Q R S T U J K L

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

ANQING GAOQI PRIMARY SCHOOL 2012 2 2 2012 2012-5-16-1 - 2012 2 13 01 03 07 17 20 24 28 30 36 39 42 44 46 52 54 58 59Unit 6 At a farm Part A Lets Talk 62 64 66 68 72 75 79-2 - 2 3 10 1 2 3 4-3 - 2 5-4 -

More information

4. 每 组 学 生 将 写 有 习 语 和 含 义 的 两 组 卡 片 分 别 洗 牌, 将 顺 序 打 乱, 然 后 将 两 组 卡 片 反 面 朝 上 置 于 课 桌 上 5. 学 生 依 次 从 两 组 卡 片 中 各 抽 取 一 张, 展 示 给 小 组 成 员, 并 大 声 朗 读 卡

4. 每 组 学 生 将 写 有 习 语 和 含 义 的 两 组 卡 片 分 别 洗 牌, 将 顺 序 打 乱, 然 后 将 两 组 卡 片 反 面 朝 上 置 于 课 桌 上 5. 学 生 依 次 从 两 组 卡 片 中 各 抽 取 一 张, 展 示 给 小 组 成 员, 并 大 声 朗 读 卡 Tips of the Week 课 堂 上 的 英 语 习 语 教 学 ( 二 ) 2015-04-19 吴 倩 MarriottCHEI 大 家 好! 欢 迎 来 到 Tips of the Week! 这 周 我 想 和 老 师 们 分 享 另 外 两 个 课 堂 上 可 以 开 展 的 英 语 习 语 教 学 活 动 其 中 一 个 活 动 是 一 个 充 满 趣 味 的 游 戏, 另 外

More information

I. 入 学 简 介 I. 同 志 社 大 学 概 要 同 志 社 大 学 于 1875 年 由 新 岛 襄 先 生 创 立, 当 时 的 名 称 为 同 志 社 英 学 校 新 岛 襄 先 生 是 第 一 位 从 欧 美 高 等 教 育 机 构 获 得 学 位 的 日 本 人, 以 近 代 日 本

I. 入 学 简 介 I. 同 志 社 大 学 概 要 同 志 社 大 学 于 1875 年 由 新 岛 襄 先 生 创 立, 当 时 的 名 称 为 同 志 社 英 学 校 新 岛 襄 先 生 是 第 一 位 从 欧 美 高 等 教 育 机 构 获 得 学 位 的 日 本 人, 以 近 代 日 本 出 願 から 入 国 までの 予 定 Application Schedules for the Intensive Japanese Language Program Bekka 2015 年 4 月 入 学 2015 年 9 月 入 学 日 本 語 オンラインレジストレーション 受 付 期 間 Online Registration Period 入 学 検 定 料 納 入 期 間 Period

More information

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File 51 C 51 51 C C C C C C * 2003-3-30 pnzwzw@163.com C C C C KEIL uvision2 MCS51 PLM C VC++ 51 KEIL51 KEIL51 KEIL51 KEIL 2K DEMO C KEIL KEIL51 P 1 1 1 1-1 - 1 Project New Project 1 2 Windows 1 3 N C test

More information

100學年度大學推甄申請面試題庫

100學年度大學推甄申請面試題庫 101 學 年 度 大 學 推 甄 申 請 面 試 題 庫 政 治 大 學 斯 拉 夫 語 文 學 系 5 阿 拉 伯 語 文 學 系 6 國 防 大 學 管 理 學 院 資 訊 管 理 學 系 7 運 籌 管 理 學 系 9 中 央 大 學 中 文 系 10 台 灣 師 範 大 學 歷 史 系 11 特 教 系 12 彰 化 師 範 大 學 中 文 系 13 國 防 理 工 學 院 14 國 立

More information