forloop_whileloop.adb

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

ADB
17
字号
with Ada.Text_IO; use Ada.Text_IO;
procedure forloop_whileloop is
   Count    : Integer; --count as Integer object
   Count_To : constant Integer := 10; --integer constant
begin
   Count := 1;
   while Count <= Count_To loop --While loop
      Put (Integer'Image (Count));
      Count := Count + 1;
   end loop;
   New_Line;
   for Count in reverse  1 .. Count_To loop --count declared here
      Put (Integer'Image (Count));
   end loop;
   New_Line;
end forloop_whileloop;

⌨️ 快捷键说明

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