if_program.adb.npp

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

NPP
31
字号
-- For example, the following fragment of an Ada 95 program only prints out Hot!-- when the contents of the memory location Temperature are greater than 30.with text_io; use text_io;with Ada.integer_text_io; use ada.integer_text_io;procedure if_program isTemperature : Integer;begin   --Temperature := 30;   while(true) loop   put("Enter the temperature:");   get(temperature);if Temperature <= 30 then --If temperature greater than 30   Put( "its cool" ); --Say its hot   New_Line;   elsif (temperature > 30) and (temperature <= 40)then   put("its hot ");   New_Line;elsif (temperature > 40) and (temperature <= 44)then   put("its hot ");   New_Line;elsif (temperature > 44) and (temperature < 49) then   put("its horrible ");   New_Line;elsif temperature >= 49 then   put("Extremly hot ");   New_Line;end if;end loop;end;

⌨️ 快捷键说明

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