Data update
This commit is contained in:
parent
796d366b97
commit
35bcdeebf8
504 changed files with 7045 additions and 610 deletions
|
|
@ -0,0 +1,28 @@
|
|||
#include <jambo.h>
|
||||
|
||||
Main
|
||||
prod=1, sum=0, x=5, y=-5,z=-2,one=1, three=3, seven=7, j=0
|
||||
Set decimal '0'
|
||||
|
||||
Let ' j := Neg(three) '
|
||||
Iterator( j+=three, Less equal( j, Pow(3,3) ), Set 'j'; Gosub(Body) )
|
||||
Let ' j := Neg(seven) '
|
||||
Iterator( j+=x, Less equal( j, seven ), Set 'j'; Gosub(Body) )
|
||||
j=555, Iterator( ++j, Less equal( j, Add(550,y) ), Set 'j'; Gosub(Body) )
|
||||
j=22, Iterator( j-=three, Greater equal( j, -28 ), Set 'j'; Gosub(Body) )
|
||||
j=x, Iterator( j+=z, Greater equal( j, y ), Set 'j'; Gosub(Body) )
|
||||
j=1927, Iterator( ++j, Less equal( j, 1939 ), Set 'j'; Gosub(Body) )
|
||||
Let ' j := Pow(11,x)'
|
||||
Iterator( ++j, Less equal( j, Add( Pow(11,x),one) ), Set 'j'; Gosub(Body) )
|
||||
|
||||
Printnl ( "SUM = ", sum, "\nPROD = ",prod )
|
||||
End
|
||||
|
||||
Subrutines
|
||||
|
||||
Define ' Body, j '
|
||||
Let( sum := Add(sum, Abs(j) ) )
|
||||
When ( Less ( Abs(prod), Pow(2,27) ) And (Not zero(j)) ) {
|
||||
Let( prod := Mul(prod, j) )
|
||||
}
|
||||
Return
|
||||
Loading…
Add table
Add a link
Reference in a new issue