Skip to content

Instantly share code, notes, and snippets.

💭
Owner, manager @NovaPlayPE | Developer @NetherGamesMC

Ragnok123 Ragnok123

💭
Owner, manager @NovaPlayPE | Developer @NetherGamesMC
  • Czech republic
View GitHub Profile
View Main.java
import java.util.*;
import java.lang.*;
import java.io.*;
class Main{
public static double PI = 3; //it is aproximally value
public static void main (String[] args) throws java.lang.Exception{
int n = 2;
for (int i = 0; i < 500; i++) {
PI += (i % 2 == 0 ? 1 : -1) * 4.0 / (n * (n + 1) * (n + 2));
n += 2;
You can’t perform that action at this time.