流れ図(フローチャート)を描く 山中和義 2008/01/09 16:18:14 (修正1回) └つづき 山中和義 2008/01/09 16:20:23 (修正1回) └流れ図でアルゴリズムを検証する。2008.1.1... 山中和義 2008/01/10 12:53:57 (修正4回) ├つづき 山中和義 2008/01/10 12:55:58 (修正4回) ├つづき2 山中和義 2008/01/10 13:01:14 (修正4回) ├つづき3 山中和義 2008/01/11 21:06:32 (修正2回) └つづき4 山中和義 2008/01/13 20:10:24 (修正1回) └サンプル(右から左へ受け流す〜♪) 山中和義 2008/01/13 20:18:23 (修正1回)
Re: つづき4 |
返事を書く ノートメニュー |
山中和義 <drdlxujciw> 2008/01/13 20:18:23 ** この記事は1回修正されてます | |
サンプル(右から左へ受け流す〜♪)
●DO〜LOOP型、関数 40 DATA 1,"3","開始","分数 A1/B1+A2/B2 の計算" !※記号番号,矢印の向き,内容,注釈 DATA 8,"3","A1,B1, A2,B2","※正の整数" DATA 3,"3","A1*B2+A2*B1→A3","分子" DATA 3,"3","B1*B2→B3","分母" DATA 4,"3","GCD{B1,B2}→g","" !関数 ※引数なし GCD{}→g DATA 2,"","2","" !※出口 DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 2,"3","2","" !※入口 DATA 9,"3","A3/g, B3/g","計算結果" DATA 1,"","終了","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 1,"3","GCD{a,b}","最大公約数" !関数 ※引数なし GCD{}→g DATA 6,"0","1","MOD(a,b)=0","" !※前判定 d2$はループ番号 DATA 0,"","","" DATA 7,"3","1","","" !※前判定 d2$はループ番号、s$="" DATA 3,"3","b→GCD","" DATA 1,"","戻る","" DATA 0,"","","" DATA 0,"","","" DATA 3,"3","b → t","" DATA 3,"3","MOD(a,b)→b","" DATA 3,"2","t → a","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" ●配列 10 DATA 1,"3","開始","5つの数値を昇順に整列する" DATA 23,"3","DIM A(5)","" !s$を直接命令となる DATA 16,"3","1","i=1,5,1","" !※指定回数の繰り返し d2$はループ番号 DATA 10,"3","A(i)","24,17,16,31,18" !c$はデータ DATA 17,"0","1","","" !※前判定 d2$はループ番号、s$="" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 16,"3","2","i=4,1,-1","" DATA 16,"0","3","J=1,i,1","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 13,"0","┌","" !NOP、結線 DATA 5,"3>","1<=","A(J):A(J+1)","" !※前が真、後が偽 DATA 3,"0","A(J)→t","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 17,"0","2","","" DATA 17,"1","3","","" DATA 3,"1","t→A(J+1)","" DATA 3,"1","A(J+1)→A(J)","" DATA 0,"","","" DATA 0,"","","" DATA 0,"","","" DATA 16,"3","4","i=1,5,1","" DATA 9,"3","A(i)","" DATA 17,"3","4","","" DATA 1,"","終了","" |
└高校数学「数値計算とコンピュータ」 山中和義 2008/01/22 20:37:31 (修正1回)