(*) also primes in result sometimes)

(**) truly, it is a random generator))

OpenConsole()

For j = 1 To 24

a = Pow(2,j)+1

PrintN(Str(a))

Next j

Skip to content
# PureBasic, Free Pascal & Fortran Examples

# Anti-Mersenne numbers till 24

# Golden number w/ Fortran

# Crude Fi w/ Basic code

# Mersenne Numbers w/ Fortran-77

# Mersenne Numbers generator on PureBasic code

# Random generator on PureBasic w/ GUI

# Prime Numbers generator on PureBasic w/ delays (stupid)

Nostalgia project of A. Kozlow, MSTU

(*) also primes in result sometimes)

(**) truly, it is a random generator))

OpenConsole()

For j = 1 To 24

a = Pow(2,j)+1

PrintN(Str(a))

Next j

Advertisements

(*) fi = 1.6….

program fi

real :: a

a = (1 + 5**(1/2))/2

print *,a

end

(*) it is not the F-word!

OpenConsole()

gold.f=1/2+Pow(5,1/2)/2

golden.f=gold*1000

PrintN(Str(golden))

(*) f-77 code is the best!

program mns

integer :: n

integer :: a

do n = 1, 32, 1

a = 2**n – 1

print *,a

end do

end

(*) for one screen of M-numbers.

OpenConsole()

For j = 1 To 32

a = Pow(2,j)-1

PrintN(Str(a))

Next j

Two strings code example!

a = Random(9876)

MessageRequester(Str(a), Str(a))

(*) Prime Numbers till 3111

(**) kinda PB delays tutorial =)

OpenConsole()

For j = 2 To 3111

flag = 0

b.f = j

For i = 2 To b – 1

c.f = b.f/i

a.f = Int(c) – Round(c, #PB_Round_Up)If Int(a)=0

flag = flag + 1

EndIfNext i

If flag = 0

Delay(333)

PrintN(Str(b))

EndIfNext j

Delay(6666)