program_6.adb.npp

来自「This contains the following topics and m」· NPP 代码 · 共 25 行

NPP
25
字号
with Ada.Text_IO; use Ada.Text_IO;with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;procedure Age is	Age :integer range 0..100;begin	Put("hello, how old are you ? ");   	Get(Age); -- might cause an exception if value entered is outside rangeif Age < 18 then   put_line("ha! you're just a baby");elsif Age <= 10#6_0# then -- note spelling of elsif	put_line("working hard?");else   put_line("Now take it easy old fella!");   end if;exceptionwhen constraint_error =>	put_line("sorry only ages 0..100 are accepted");end age; -- procedure name is optional at end;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?