[examples] Tweak.

This commit is contained in:
Alessandro Coglio 2022-08-03 15:15:16 -07:00 committed by Pranav Gaddamadugu
parent 9deaa52aa6
commit 4621b87712

View File

@ -1,6 +1,6 @@
// The 'interest2' main function. // The 'interest2' main function.
function main(capital: u32, public rate: u32, periods: u8) -> u32 { function main(capital: u32, public rate: u32, periods: u8) -> u32 {
console.assert(periods < 50u8); console.assert(periods <= 50u8);
let amount: u32 = capital; let amount: u32 = capital;
for i:u8 in 0u8..50u8 { // accrue for max 50 periods for i:u8 in 0u8..50u8 { // accrue for max 50 periods
if i < periods { if i < periods {