Add multilingual Agila learning examples and Git practice guide
This commit is contained in:
commit
85f487afb0
79 files changed
+813
No files matched your search
@@ -0,0 +1,9 @@
|
||||
# Pagkuwenta sa plano sa pagtuon nga magamit pag-usab
|
||||
|
||||
Paghimo ug pagsulay og gamay nga bahin alang sa ihap sa leksiyon. Sugdi sa nested function; mahimo nimo kining ibalhin ngadto sa Ada package sa lokal nga proyekto nga adunay daghang file.
|
||||
|
||||
- Isulti ang patakaran sa Total/Done nga dili motudlo sa source code.
|
||||
- Susihi ang (0,0), (4,0), (4,3), (4,4), ug (4,5).
|
||||
- Ipasabot nganong maabot lamang ang subtraction kon ang Done ubos sa Total.
|
||||
- Ilahi ang pagkuwenta gikan sa output.
|
||||
- Iapil ang tala sa pagrepaso nga nagpasabot sa usa ka desisyon sa disenyo ug usa ka limitasyon.
|
||||
@@ -0,0 +1,13 @@
|
||||
with Ada.Text_IO;
|
||||
|
||||
procedure Main is
|
||||
function Remaining (Total, Done : Natural) return Natural is
|
||||
begin
|
||||
if Done >= Total then
|
||||
return 0;
|
||||
end if;
|
||||
return Total - Done;
|
||||
end Remaining;
|
||||
begin
|
||||
Ada.Text_IO.Put_Line (Natural'Image (Remaining (4, 1)));
|
||||
end Main;
|
||||
Reference in new issue
Block a user