型と定数
このページには最新のブラウザ(SharedArrayBuffer対応)が必要です。Chrome、Edge、Firefox、Safariを最新バージョンに更新してください。
English
Six data types
- The 2026 guide uses
INTEGER,REAL,CHAR,STRING,BOOLEANandDATE. DATEis in this guide. It is not in the IGCSE 0478 syllabus for 2026–2028.- A paper that uses a date tells you the format, because dates are written differently around the world.

English
DECLARE Name : STRING
DECLARE Done : BOOLEAN
DECLARE Birth : DATE
Name ← "Ada"
Done ← TRUE
OUTPUT Name
OUTPUT Done
English
CONSTANT uses =
- A constant is a name for a value that the program does not change.
- The guide writes
CONSTANT HourlyRate = 6.50— with=, not with the arrow. - Only a literal may stand on the right: a number, or text in quotes.
English
CONSTANT PassMark = 50
OUTPUT PassMark
English
Watch out
- Variables are stored with
←. Constants are declared with=. - The guide's own date example is written
02/01/2005. On the paper, follow the format the question gives you.
English
Common mistakes
BOOLEANvalues areTRUEandFALSE, in capitals.- A
CHARis one character in single quotes, such as'A'. ASTRINGuses double quotes.
English
Now you try
- Declare a constant with
=and output it. - Text needs quotes:
"Ada", notAda.
English
Independent transfer
The final task has no supplied algorithm. Plan its inputs, processing and outputs, then solve it before opening support. Check more than the sample case.
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
定数PassMarkを50に設定して出力します。CONSTANT行に値を入力してください。
実行ボタンをクリックして出力を確認してください。
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
文字列Adaを引用符で囲んで出力し、プログラムがAdaを印刷するようにします。
実行ボタンをクリックして出力を確認してください。
難易度 1/5 · 100 コイン + 今日初回達成時の小ボーナス
NameをSTRINGとして宣言し、Adaを格納して出力します。
実行ボタンをクリックして出力を確認してください。
難易度 3/5 · 200 コイン + 今日初回達成時の小ボーナス
定数 Rate = 3 を宣言する。整数 Hours を読み込む。Hours に Rate を乗じた結果を出力する。
実行ボタンをクリックして出力を確認してください。