This commit is contained in:
Pranav Gaddamadugu 2023-03-27 10:08:21 -07:00
parent 28e4a004a2
commit dcf2b6fa47

View File

@ -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;
}
}