Kiểu dữ liệu và hằng số
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.

DECLARE Name : STRING
DECLARE Done : BOOLEAN
DECLARE Birth : DATE
Name ← "Ada"
Done ← TRUE
OUTPUT Name
OUTPUT Done
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.
CONSTANT PassMark = 50
OUTPUT PassMark
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.
Common mistakes
BOOLEANvalues areTRUEandFALSE, in capitals.- A
CHARis one character in single quotes, such as'A'. ASTRINGuses double quotes.
Now you try
- Declare a constant with
=and output it. - Text needs quotes:
"Ada", notAda.
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.
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
KhHIẾN một hằng số PassMark bằng 50 và xuất ra nó. Điền giá trị vào dòng CONSTANT.
Nhấn Chạy để xem kết quả ở đây.
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Xuất ra từ Ada trong ngoặc kép, để chương trình in ra Ada.
Nhấn Chạy để xem kết quả ở đây.
Độ khó 1/5 · 100 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
KhHIẾN Name là một STRING, lưu Ada, và xuất ra nó.
Nhấn Chạy để xem kết quả ở đây.
Độ khó 3/5 · 200 xu + phần thưởng nhỏ khi hoàn thành lần đầu tiên hôm nay
Khai báo hằng Rate = 3. Đọc integer Hours. Xuất Hours nhân với Rate.
Nhấn Chạy để xem kết quả ở đây.