mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-23 10:12:21 +03:00
Add test
This commit is contained in:
parent
28e4a004a2
commit
dcf2b6fa47
@ -0,0 +1,17 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
function calculate_interest(principal: u64, rate: u64, periods: u64) -> u64 {
|
||||
let amount: u64 = principal;
|
||||
|
||||
for i:u64 in 0u64..1000000000000000000000000000000000000000000000000000000000000000000000000000000000000u64 {
|
||||
if i < periods {
|
||||
amount += (amount * rate) / 10000u64;
|
||||
}
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user