Share your repls and programming experiences

← Back to all posts
π in QBasic
AmazingMech2418

I think I'm pretty much doing pi approximations in every language now, so here it is in QBasic! However, note that I will not do this in normal BASIC since QBasic just doesn't have the graphics included and doesn't require the number to string conversions.

Here are the other approximations:
Fortran - https://repl.it/talk/share/p-in-Fortran/34890
APL - https://repl.it/talk/share/p-in-APL/34888
Forth - https://repl.it/talk/share/p-in-Forth/34652
LOLCODE - https://repl.it/talk/share/p-in-LOLCODE/34421
Python and Node.js (Node is linked in post) - https://repl.it/talk/share/2-Approximations-of-p-In-Only-Four-Lines-of-Code/32773
C - https://repl.it/talk/share/p-Approximations-in-C/33461

Credit to @TheForArkLD , @Warhawk947 , and @LizFoster for inspiring these approximations. Most of these use the Nilakantha Series, although I also use the arctangent method (multiplying the radian arctangent of 1 by 4 to get pi and getting the arctangent with an infinite series) in three of them (Python, Node, and C).

Voters
HahaYes
Warhawk947
Highwayman
BobTheTomatoPie
TheForArkLD
ChezCoder
ANDREWVOSS
CodingCactus
AmazingMech2418
Comments
hotnewtop
lchittori1

मस्त == (amazing)

AmazingMech2418

@lchittori1 Thank you!

CodingCactus

lovely :)

AmazingMech2418

@CodingCactus Thank you! By the way, that was fast!

CodingCactus

@AmazingMech2418 scrolling through new page lol

AmazingMech2418

@CodingCactus My next one is probably going to be Java... LOL!

AmazingMech2418

@CodingCactus I do that too...

CodingCactus

@AmazingMech2418 i was about to ask, if you've run out of languages lol

AmazingMech2418

@CodingCactus There are plenty in Repl.it! If I don't know one of the languages, why not learn it? That's what I did for APL, Fortran, and Forth...

CodingCactus

@AmazingMech2418 Are you actually going to do all of them!?

AmazingMech2418

@CodingCactus Why not? LOL! When I get to the esolangs (I already did LOLCODE), it will get difficult...

CodingCactus

@AmazingMech2418 lol, well good luck!!!

:)

AmazingMech2418

@CodingCactus Thank you!

AmazingMech2418

@CodingCactus I just finished programming the Java one. I'm not going to post it yet though...

AmazingMech2418

@CodingCactus Now, I've programmed in Ruby too. I'm going to post that later too.

AmazingMech2418

@CodingCactus Do you remember the learn section in Repl.it talk?

It might just be because I'm in explorer mode, but I thought they were just going to change the color to a darker green, not change the name...

Codemonkey51

probably to tell people it's not for questions @AmazingMech2418

AmazingMech2418

@CodingCactus I just posted the Java one...

ChezCoder

@AmazingMech2418 curious how ur going to do it in HTML or CSS

AmazingMech2418

@ChezCoder You mean like my first usage of the Nilakantha Series, even before I found Repl.it? https://amazinigmech2418.github.io/Pi/

[deleted]

!PI GANG!