第10回 コーディングと統合(WWW用).PDF

Similar documents
コンピュータ概論

Lesson 1 1 EXVBA2000 Lesson01 Lesson01.xls 2

PowerPoint プレゼンテーション

Pascal Pascal Free Pascal CPad for Pascal Microsoft Windows OS Pascal

hotline01_1.qxd


2 1/2 1/4 x 1 x 2 x 1, x 2 9 3x 1 + 2x 2 9 (1.1) 1/3 RDA 1 15 x /4 RDA 1 6 x /6 1 x 1 3 x 2 15 x (1.2) (1.3) (1.4) 1 2 (1.5) x 1

8 if switch for while do while 2

コンピュータ概論


2005 D Pascal CASL ( ) Pascal C 3. A A Pascal TA TA TA


¥¢¥ë¥´¥ê¥º¥à¥¤¥ó¥È¥í¥À¥¯¥·¥ç¥ó ÎØ¹Ö #1

94 expression True False expression FalseMSDN IsNumber WorksheetFunctionIsNumberexpression expression True Office support.office.com/ja-jp/ S

untitled

untitled

1-8 No13.ai

2009 D Pascal CASL II ( ) Pascal C 3. A A Pascal TA TA

2011 D Pascal CASL II ( ) Pascal C 3. A A Pascal TA TA enshu-

Verilog HDL による回路設計記述

PBASIC 2.5 PBASIC 2.5 $PBASIC directive PIN type New DEBUG control characters DEBUGIN Line continuation for comma-delimited lists IF THEN ELSE * SELEC

帝国議会の運営と会議録をめぐって

外為オンライン FX 取引 操作説明書

1 2

INDEX

INDEX

untitled

平成17年度後期

BASICとVisual Basic

B 5 (2) VBA R / B 5 ( ) / 34

サービス付き高齢者向け住宅賠償責任保険.indd

syspro-0405.ppt

1. A0 A B A0 A : A1,...,A5 B : B1,...,B

新・明解Java入門

PowerPoint プレゼンテーション

Microsoft Word - VBA基礎(3).docx

parser.y 3. node.rb 4. CD-ROM

1 シミュレーションとは何か?

.NETプログラマー早期育成ドリル ~VB編 付録 文法早見表~


Excel Excel Excel = Excel ( ) 1

D0120.PDF

L N P Y F C T V W Z I X Pentomino Form Name Caption Position FormMain podesktopcenter

VDM-SL VDM VDM-SL Toolbox VDM++ Toolbox 1 VDM-SL VDM++ Web bool

untitled

D0020.PDF

Java updated

Microsoft Word 練習問題の解答.doc

My関数の作成演習問題集

解きながら学ぶJava入門編

Excel Excel Excel = Excel III 7 ( ) 1

<リスト1> AD コンバータへのデータの出力例 NEC PC98 用 mov al,22h // CLK -> 1, CS -> 0, DI -> 0 out 32h,al // シリアル ポートにデータ出力 PC/AT 互換機用 mov al,00h // CLK -> 1 mov dx,3fb

untitled

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

Microsoft PowerPoint - Visualプログラミング

バスケットボール

Java演習(4) -- 変数と型 --

untitled

compiler-text.dvi

Appendix A BASIC BASIC Beginner s All-purpose Symbolic Instruction Code FORTRAN COBOL C JAVA PASCAL (NEC N88-BASIC Windows BASIC (1) (2) ( ) BASIC BAS

JavaScript の使い方

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó

DA100データアクイジションユニット通信インタフェースユーザーズマニュアル

PowerPoint プレゼンテーション

untitled

: gettoken(1) module P = Printf exception End_of_system (* *) let _ISTREAM = ref stdin let ch = ref ( ) let read () = (let c =!ch in ch := inp

n 第1章 章立ての部分は、書式(PC入門大見出し)を使います

C言語によるアルゴリズムとデータ構造

JavaScript 1.! DOM Ajax Shelley Powers,, JavaScript David Flanagan, JavaScript 2

/ , ,908 4,196 2, ,842 38, / / 2 33 /

Transcription:

10 January 8, 2004

algorithm algorithm algorithm

(unit testing) (integrated testing) (acceptance testing)

Big-Bang (incremental development)

(goto

goto DO 50 I=1,COUNT IF (ERROR1) GO TO 60 IF (ERROR2) GO TO 60 50 CONTINUE 60 {Code for Error1 handling} GO TO 80 70 {Code for Error2 handling} 80 CONTINUE

I = I while I <= TableSize and Table(I) <> Target do I = I + 1 if I > TableSize then {code for Target not found} else {code for Target found} for I=1 to TableSize do if Table(i) = Target then goto Found NotFound: {code for Target not found} Found: {code for Target found}

Procedure FillPowersArray(var Base:integer;var Powers:array of integer); Powers[1]:=Base; Powers[2]:=Base*Base; Powers[3]:=Base*Base*Base; Powers[4]:=Base*Base*Base*Base; Powers[5]:=Base*Base*Base*Base*Base; Powers[6]:=Base*Base*Base*Base*Base*Base; Powers[7]:=Base*Base*Base*Base*Base*Base*Base; Powers[8]:=Base*Base*Base*Base*Base*Base*Base*Base; end{procedure FillPowerArray}: Procedure FillPowersArray(var Base:integer;var Powers:array of integer); var Index:integer; Powers[1]:=Base; for Index :=2 to 8 do Powers[Index]:=Powers[Index-1]*Base; end{procedure FillPowerArray}:

function IntegerFromHex(HexDigit:char):integer; var ASCIIValue:integer; ASCIIValue:=chr(HexDigit); if ASCIIValue < 58 then IntegerFromHex := ASCIIValue 48; else IntegerFromHex := ASCIIValue 55; end; {function IntegerFromHex} function IntegerFromHex(HexDigit:char):integer; case HexDigit of 0 :IntegerFromHex := 0; 1 :IntegerFromHex := 1; 2 :IntegerFromHex := 2; 3 :IntegerFromHex := 3; 4 :IntegerFromHex := 4; 5 :IntegerFromHex := 5; 6 :IntegerFromHex := 6; 7 :IntegerFromHex := 7; 8 :IntegerFromHex := 8; 9 :IntegerFromHex := 9; A :IntegerFromHex := 10; B :IntegerFromHex := 11; C :IntegerFromHex := 12; D :IntegerFromHex := 13; E :IntegerFromHex := 14; F :IntegerFromHex := 15; end{case} end;{function IntegerFromHex}

JIS X0201 8 1 2

(1) procedure Mode1(A:array[1..N] of integer;n:integer; var Mode,ModeFrequency:integer); var I,TempFreq:integer; Mode := A[1]; ModeFrequency := 1; TempFreq := 1; for I:= 2 to N do if A[I] <> A[I-1] then TempFreq := 1 else TempFreq := TempFreq + 1; if TempFreq > ModeFrequency then ModeFrequency := TempFreq; Mode := A[I] end end {for} end{procedure Mode1}

(2) procedure Mode2(A:array[1..N] of integer;n:integer;var Mode,ModeFrequency:integer); var I:integer; Mode := A[1]; ModeFrequence := 1; TempFreq := 1; for I:= 2 to N do if A[I] = A[I-ModeFrequency] then Mode := A[I]; ModeFrequency := ModeFrequency + 1; end {if} end {for} end{procedure Mode2}

2 (1) DistanceRecord = record yards:integer; Feet:integer; Inches:integer end; function D1isLonger(Distance1,Distance2:DistanceRecord):boolean; D1isLonger := false; if (Distance1.Yards = Distance2.Yards) and (Distance1.Feet >Distance2.Feet) then D1isLonger := true else if (Distance1.Feet = Distance2.Feet) and (Distance1.Inches > Distance2.Inches) then D1isLonger := true end {function D1isLonger}

2 (2) DistanceRecord = record yards:integer; Feet:integer; Inches:integer end; function D1isLonger(Distance1,Distance2:DistanceRecord):boolean; var TotalDistance1,TotalDistance2:integer; TotalDistance1 := (Distance1.Yards * 36) + (Distance1.Feet * 12) + Distance1.Inches; TotalDistance2 := (Distance2.Yards * 36) + (Distance2.Feet * 12) + Distance2.Inches; D1isLonger := TiotalDistance1 > TotalDistance2 end {function D1isLonger}

OHP

Next := 1; while (not eoln) and (Next <= Maxlength) do end read(instring[next]); Next := Next + 1 end; readln; for Next := Next to Maxlength do Instring[Next] := Blank