while_program.adb
来自「This contains the following topics and m」· ADB 代码 · 共 18 行
ADB
18 行
--A while statement in Ada 95
--Illustrated below is a fragment of code that uses a while statement
--to write the text message Hello 6 times
with Text_IO; use Text_IO;
procedure while_program is
--Count : Integer ;
Count : Integer := 3;
begin
--Count := 1; --Set count to 1
while Count <= 6 loop --While count less than or equal 6
Put ("Hi Sai welcome to silver software"); --Print Hello
New_Line;
Count := Count + 1; --Add 1 to count
end loop;
end while_program;
--Note: The statement: Count := Count + 1; adds 1 to the contents of Count
-- and puts the result back into the memory location Count.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?