📄 check.adb.dg
字号:
with ada;
with text_io;
use text_io;
with ada.ada__float_text_io;
use ada.ada__float_text_io;
procedure check is
price_per_kilo : float;
kilos_of_apples : float;
cost : float;
begin
price_per_kilo := (10066330.0*2**(-23));
kilos_of_apples := (10905190.0*2**(-21));
cost := price_per_kilo * kilos_of_apples;
ada__text_io__put__4 ("price_per_kilo is :");
ada__float_text_io__put__2 (price_per_kilo, fore =>
ada__float_text_io__default_fore, aft =>
ada__float_text_io__default_aft, exp =>
ada__float_text_io__default_exp);
ada__text_io__new_line__2 (spacing => 1);
ada__text_io__put__4 ("kilos_of_apples is:");
ada__float_text_io__put__2 (kilos_of_apples, fore =>
ada__float_text_io__default_fore, aft =>
ada__float_text_io__default_aft, exp =>
ada__float_text_io__default_exp);
ada__text_io__new_line__2 (spacing => 1);
ada__text_io__put__4 (" the cost is:");
ada__float_text_io__put__2 (cost, fore =>
ada__float_text_io__default_fore, aft =>
ada__float_text_io__default_aft, exp =>
ada__float_text_io__default_exp);
ada__text_io__new_line__2 (spacing => 1);
ada__text_io__new_line__2 (spacing => 1);
return;
end check;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -