***** Mission 2-3 ( 1000カウントまでの時間10飛び表示 ) ***** identification division. program-id. cnt003. * data division. working-storage section. 01 cnt pic 9(04) value 0. 01 cnt1 pic 9(04) value 0. 01 wtime. 03 hh pic 9(02). 03 mm pic 9(02). 03 ss pic 9(02). 01 stime pic 9(06) value 0. 01 etime pic 9(06) value 0. 01 xtime pic 9(06) value 0. * procedure division. * ***** スタート時間の取得と計算 ***** accept wtime from time compute stime = (hh * 3600) + (mm * 60) + ss * ***** 処 理 ***** perform until cnt = 1000 add 1 to cnt cnt1 if cnt1 = 10 then display cnt move zero to cnt1 else continue end-if * continue(コンティニュー)の意味は「何もしない」です end-perform * ***** 終了時間の取得と計算 ***** accept wtime from time compute etime = ((hh * 3600) + (mm * 60) + ss) compute xtime = etime - stime compute hh = xtime / 3600 compute etime = xtime - (hh * 3600) compute mm = xtime / 60 compute ss = xtime - (mm * 60) * ***** 所要時間の表示 ***** display "time = " hh ":" mm ":" ss stop run.