Difference between revisions of "Basic Pascal Tutorial/Chapter 2/Programming Assignment/ja"

From Free Pascal wiki
Jump to navigationJump to search
(Created page with "{{Programming Assignment 2}} 2F - Programming Assignment (author: Tao Yue, state: unchanged) Again find the sum and average of five numbers, but this time read in five integ...")
 
Line 1: Line 1:
{{Programming Assignment 2}}
+
{{Programming Assignment 2/ja}}
  
2F - Programming Assignment (author: Tao Yue, state: unchanged)
+
2F - 練習問題 (著者: Tao Yue, 状態: 原文のまま修正なし)
  
Again find the sum and average of five numbers, but this time read in five integers and display the output in neat columns.
+
もう一度5つの数字の合計と平均を求めてみよう。ただし、今度は5つの average of five numbers, but this time read in five integers and display the output in neat columns.
  
 
Refer to the original problem specification if needed. You should type in the numbers separated by spaces from the keyboard: <tt>45 7 68 2 34</tt>.
 
Refer to the original problem specification if needed. You should type in the numbers separated by spaces from the keyboard: <tt>45 7 68 2 34</tt>.

Revision as of 12:24, 10 August 2015

Template:Programming Assignment 2/ja

2F - 練習問題 (著者: Tao Yue, 状態: 原文のまま修正なし)

もう一度5つの数字の合計と平均を求めてみよう。ただし、今度は5つの average of five numbers, but this time read in five integers and display the output in neat columns.

Refer to the original problem specification if needed. You should type in the numbers separated by spaces from the keyboard: 45 7 68 2 34.

The output should now look like this:

Number of integers = 5

Number1:      45
Number2:       7
Number3:      68
Number4:       2
Number5:      34
================
Sum:         156
Average:      31.2

As an added exercise, you can try to write the output to a file. However, I won't use files in the problem solution.

previous contents next