Skip to content

Instantly share code, notes, and snippets.

Avatar

Timo Bühlmann 71m024

View GitHub Profile
View Euler.java
public class Euler {
public static void main(String[] args) {
print(euler(1, 2, 2));
print(euler(1, 2, 1));
print(euler(1, 2, 0.1));
print(euler(1, 2, 0.01));
print(euler(1, 2, 0.001));
print(euler(1, 2, 0.0001));
print(euler(1, 2, 0.00001));
View Gollatz36.java
public class Collatz36 {
public static void main(String[] args) {
int groupIndex = 0;
int smallestGroupNumber = 0;
int biggestGroupNumber = 0;
for (int n = 101; n < 1000000; n++) {
int stepIndex = 0;
int step = n;
while (stepIndex < 37 && step != 1) {
View polnischeNotation.java
import java.util.Arrays;
public class Main {
private char[] digits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
private char[] operators = {'+', '*'};
private char[] basement = {'$', '_', '_', '_', '_', '_', '_', '_'};
private int basementPointer = 0;
private char basementBottom = '$';
private char basementPlaceholder = '_';
View Main.java
public class Main {
private char[] digits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
private char[] operators = {'+', '*'};
private char[] basement = {'$', '_', '_', '_', '_', '_', '_', '_'};
private int basementPointer = 0;
private char basementBottom = '$';
private char basementPlaceholder = '_';
private char[] word = {'3', '4', '+', '6', '2', '+', '*'};
You can’t perform that action at this time.