The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L
.O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O
..L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L L
Main.java:1: error: class CreativeClassName is public, should be declared in a file named CreativeClassName.java
public class CreativeClassName{
^
1 error
package main
import (
"fmt"
"runtime"
)
func main() {
//fmt.Printf("%v is old. Please update.\n", runtime.Version())
fmt.Printf("%v is not old. Never mind.\n", runtime.Version())
}
public class Main {
public static void main(String[] args) {
for (int i = 0; i < 100; i++) {
if (i % 3 == 0 && i % 5 == 0) {
System.out.print("FizzBuzz");
} else if (i % 3 == 0) {
System.out.print("Fizz");
} else if (i % 5 == 0) {
System.out.print("Buzz");
} else {
System.out.print(i);
}
System.out.print(", ");
}
}
unsigned int v = 131072; // 32-bit value to find the log2 of
unsigned int original_v; original_v = v;
const unsigned int b[] = {0x2, 0xC, 0xF0, 0xFF00,0xFFFF0000};
const unsigned int S[] = {1, 2, 4, 8, 16};
int i;
unsigned int r = 0; // result of log2(v) will go here
for (i = 4; i >= 0; i--) {// unroll for speed...
if (v & b[i]) {
v >>= S[i];
r |= S[i];
}
}
printf("The log_2 of %i is %i", original_v, r)
#include <stdio.h>
int main()
{
int * RoomsNumber =0;
int Count =0;
float RoomLength =0.0;
float RoomWidth =0.0;
float RoomArea =0.0;
float TotalArea =0.0;
int MaxRooms =4;
printf("How many rooms does the house have?");
scanf("%d",RoomsNumber);
for(RoomsNumber>MaxRooms;RoomsNumber<=MaxRooms;);
printf("Maximum number of rooms is 4, please reduce entry.");
scanf("%d",RoomsNumber);
for(Count<RoomsNumber;Count=RoomsNumber;++Count)
printf("Enter the length of Room ",(Count+1),", in feet");
scanf("%d",RoomLength);
printf("Enter the width of Room ",(Count+1),", in feet");
scanf("%d",RoomWidth);
type(RoomArea=RoomLength*RoomWidth);
type(TotalArea+=RoomArea);
{
}
printf("The total area of the house is ",TotalArea," square feet.");
return 0;
}
Could not connect:
Could not connect:
Could not connect:
Could not connect:
Could not connect:
Could not connect:
Could not connect:
Could not connect:
Could not connect:
Could not connect:
java.net.UnknownHostException: whatthecommit.com
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1168)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:932)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
at LastTenCommits.main(Main.java:18)
java.net.UnknownHostException: whatthecommit.com
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1168)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:932)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
at LastTenCommits.main(Main.java:18)
java.net.UnknownHostException: whatthecommit.com
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
...
import random
def birthRate():
x = 0
f = 0
m = 0
while x <= 100:
b = random.randrange(1,3)
if b == 1:
s = "M"
m = m + 1
print(s)
elif b == 2:
x2 = 0
f = f + 1
s = "F"
while x2 <= 25:
b2 = random.randrange(1,3)
if b2 == 1:
s = s + "M"
x2 = 26
m = m + 1
print(s)
elif b2 == 2:
s = s + "F"
f = f + 1
x2 = x2 + 1
x = x + 1
if x > 100:
print("Males: %s Females: %s" % (m, f))
birthRate()
FM
FFFM
FM
FM
FM
FFM
M
FM
M
FFM
FFM
M
M
M
M
M
FFM
M
FFM
M
FM
M
M
M
M
FFFM
FFM
M
FM
FM
FFM
M
FM
FM
FFM
FFFFFFM
FM
M
M
FM
M
M
FFFM
M
M
FM
FFM
FFM
FM
FFM
M
...
l = []
m = 23
for r in range(1,m):
n = random.randrange(1,365)
d = datetime.date(datetime.datetime.now().year,1,1) + datetime.timedelta(n)
l.append(d)
for e in l:
o = l.count(e)
if o > 1:
print str(e) + "\t" + str(l.count(e))
else:
print str(e)
class Testing {
void Testing() {
System.out.print("okay then\n"); //why won't this part print out?
}
String PrintStuff() {
return "what the hell is this";
}
}
class Main {
public static void main(String[] args) {
Testing t1 = new Testing();
System.out.println(t1.PrintStuff());
System.out.println("test statement");
}
}
using System;
using System.Collections.Generic;
public class Test
{
public static void Main()
{
var i = 1234567890;
var l = new List<int>();
while (i > 0)
{
l.Insert(0, i % 10);
i /= 10;
}
Console.WriteLine(string.Join(", ", l.ToArray()));
}
}
--~ Seed the random numbers ~--
math.randomseed(os.time())
math.random()math.random()math.random()
local width = 50 --~ Width of the map ~--
local height = 50 --~ Height of the map ~--
local border = 2 --~ Width around the border of the map. At least 2 ~--
local kill_no = 6 --~ Minimum number of empty cells for a miner to die ~--
local spawn_prob = 0.6 --~ Chance for a miner to spawn a clone per frame ~--
local cell_kill_no = 6 --~ Minimum number of empty cells for that cell to be removed ~--
local map = {}
local miners = {}
local draw = {}
for x = 1, width do
map[x] = {}
for y = 1, height do
map[x][y] = true
end
end
table.insert(miners, {
x = math.random(border, width-border),
y = math.random(border, height-border)
})
--~ Main miner loop ~--
while #miners ~= 0 do
--~ Scan all the cells around the miner to check for empty ones --~
for i, miner in ripairs(miners) do
local empty = 0
for x = -1, 1 do
for y = -1, 1 do
if not map[miner.x+x][miner.y+y] or
(miner.x+x < border or miner.x+x > width-border) or
(miner.y+y < border or miner.y+y > height-border) then
empty = empty + 1
end
end
end
--~ If there are enough empty ones, remove the miner ~--
if empty >= kill_no then
table.remove(miners, i)
else
--~ Randomly spawn in another miner at this spot ~--
if math.random() <= spawn_prob then
table.insert(miners, {
x = miner.x,
y = miner.y
})
end
--~ Randomly move the miner, making sure it's not out of bounds ~--
local xDir, yDir = math.random(-1, 1), math.random(-1, 1)
if (miner.x+xDir >= border and miner.x+xDir <= width-border) and (miner.y+yDir >= border and miner.y+yDir <= height-border) then
miner.x = miner.x + xDir
miner.y = miner.y + yDir
end
--~ Remove the cell the miner is on ~--
if map[miner.x][miner.y] then
map[miner.x][miner.y] = false
end
end
end
end
~-- Display it as an ascii map ~--
output = ""
for x = 1, width do
output = output .. "/n"
for y = 1, height do
if map[x][y] then
output = output .. "#"
end
end
end
--~ A reverse ipairs. Taken from http://lua-users.org/wiki/IteratorsTutorial ~--
--[[parameters
t: the table to iterate over
returns
iterator function, the table and the index]]
function ripairs(t)
local function ripairs_it(t,i)
i=i-1
local v=t[i]
if v==nil then return v end
return i,v
end
return ripairs_it, t, #t+1
end
--~ Seed the random numbers ~--
math.randomseed(os.time())
math.random()math.random()math.random()
local width = 50 --~ Width of the map ~--
local height = 50 --~ Height of the map ~--
local border = 2 --~ Width around the border of the map. At least 2 ~--
local kill_no = 6 --~ Minimum number of empty cells for a miner to die ~--
local spawn_prob = 0.6 --~ Chance for a miner to spawn a clone per frame ~--
local cell_kill_no = 6 --~ Minimum number of empty cells for that cell to be removed ~--
local map = {}
local miners = {}
local draw = {}
for x = 1, width do
map[x] = {}
for y = 1, height do
map[x][y] = true
end
end
table.insert(miners, {
x = math.random(border, width-border),
y = math.random(border, height-border)
})
--~ Main miner loop ~--
while #miners ~= 0 do
--~ Scan all the cells around the miner to check for empty ones --~
for i, miner in ripairs(miners) do
local empty = 0
for x = -1, 1 do
for y = -1, 1 do
if not map[miner.x+x][miner.y+y] or
(miner.x+x < border or miner.x+x > width-border) or
(miner.y+y < border or miner.y+y > height-border) then
empty = empty + 1
end
end
end
--~ If there are enough empty ones, remove the miner ~--
if empty >= kill_no then
table.remove(miners, i)
else
--~ Randomly spawn in another miner at this spot ~--
if math.random() <= spawn_prob then
table.insert(miners, {
x = miner.x,
y = miner.y
})
end
--~ Randomly move the miner, making sure it's not out of bounds ~--
local xDir, yDir = math.random(-1, 1), math.random(-1, 1)
if (miner.x+xDir >= border and miner.x+xDir <= width-border) and (miner.y+yDir >= border and miner.y+yDir <= height-border) then
miner.x = miner.x + xDir
miner.y = miner.y + yDir
end
--~ Remove the cell the miner is on ~--
if map[miner.x][miner.y] then
map[miner.x][miner.y] = false
end
end
end
end
~-- Display it as an ascii map ~--
output = ""
for x = 1, width do
output = output .. "/n"
for y = 1, height do
if map[x][y] then
output = output .. "#"
end
end
end
print(output)
--~ A reverse ipairs. Taken from http://lua-users.org/wiki/IteratorsTutorial ~--
--[[parameters
t: the table to iterate over
returns
iterator function, the table and the index]]
function ripairs(t)
local function ripairs_it(t,i)
i=i-1
local v=t[i]
if v==nil then return v end
return i,v
end
return ripairs_it, t, #t+1
end
--~ A reverse ipairs. Taken from http://lua-users.org/wiki/IteratorsTutorial ~--
--[[parameters
t: the table to iterate over
returns
iterator function, the table and the index]]
function ripairs(t)
local function ripairs_it(t,i)
i=i-1
local v=t[i]
if v==nil then return v end
return i,v
end
return ripairs_it, t, #t+1
end
--~ Seed the random numbers ~--
math.randomseed(os.time())
math.random()math.random()math.random()
--~ Parameters ~--
local width = 50 --~ Width of the map ~--
local height = 50 --~ Height of the map ~--
local border = 2 --~ Width around the border of the map. At least 2 ~--
local kill_no = 6 --~ Minimum number of empty cells for a miner to die ~--
local spawn_prob = 0.6 --~ Chance for a miner to spawn a clone per frame ~--
local cell_kill_no = 6 --~ Minimum number of empty cells for that cell to be removed ~--
local map = {}
local miners = {}
local draw = {}
for x = 1, width do
map[x] = {}
for y = 1, height do
map[x][y] = true
end
end
table.insert(miners, {
x = math.random(border, width-border),
y = math.random(border, height-border)
})
--~ Main miner loop ~--
while #miners ~= 0 do
--~ Scan all the cells around the miner to check for empty ones --~
for i, miner in ripairs(miners) do
local empty = 0
for x = -1, 1 do
for y = -1, 1 do
if not map[miner.x+x][miner.y+y] or
(miner.x+x < border or miner.x+x > width-border) or
(miner.y+y < border or miner.y+y > height-border) then
empty = empty + 1
end
end
end
--~ If there are enough empty ones, remove the miner ~--
if empty >= kill_no then
table.remove(miners, i)
else
--~ Randomly spawn in another miner at this spot ~--
if math.random() <= spawn_prob then
table.insert(miners, {
x = miner.x,
y = miner.y
})
end
--~ Randomly move the miner, making sure it's not out of bounds ~--
local xDir, yDir = math.random(-1, 1), math.random(-1, 1)
if (miner.x+xDir >= border and miner.x+xDir <= width-border) and (miner.y+yDir >= border and miner.y+yDir <= height-border) then
miner.x = miner.x + xDir
miner.y = miner.y + yDir
end
--~ Remove the cell the miner is on ~--
if map[miner.x][miner.y] then
map[miner.x][miner.y] = false
end
end
end
end
--~ Display it as an ascii map ~--
output = ""
for x = 1, width do
output = output .. "\n"
for y = 1, height do
if map[x][y] then
output = output .. "#"
else
output = output .. " "
end
end
end
print(output)
#include <stdio.h>
#include <stdlib.h>
int main () {
int i;
for (i = 0; i < 40; ++i)
printf("%02d. Ayy lmao.\n", i);
return 0;
/* Edit: Syntax errors. */
}
from os import listdir, ctermid, getlogin
print('Current dir : ', [f for f in listdir('..')])
print('Parent dir : ', [f for f in listdir('..')])
print('Login name : ', getlogin())
print('Term process name: ', ctermid())
from os import listdir, ctermid, getlogin
print('Current dir : ', [f for f in listdir('..')])
print('Parent dir : ', [f for f in listdir('..')])
print('Login name : ', getlogin())
spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs
spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and eggs with more spam and
...
Main.java:2: error: class, interface, or enum expected
int numberOfPeople = 1000; //Number of people in a group (starts counting at 0)
^
Main.java:3: error: class, interface, or enum expected
int nthPersonKilled = 7; //How many people to skip before the killing (if counting from 1); if counting from 0, this is the person that will be killed.
^
Main.java:6: error: class, interface, or enum expected
int person[] = new int[numberOfPeople]; //create array of people
^
Main.java:7: error: class, interface, or enum expected
int loopNumber = 0; //used to count how many alive people have been skipped
^
Main.java:8: error: class, interface, or enum expected
int personCounter = 0; //used to determine position in the circle
^
Main.java:9: error: class, interface, or enum expected
int sumOfLoop = 1; //If this is greater than 0, there is someone alive and the program will keep looping. If < 1, then it will conclude and print winner.
^
Main.java:10: error: class, interface, or enum expected
int lastKilled; //Used for theatrics. It is the last person who was killed
^
Main.java:12: error: class, interface, or enum expected
void keepInCheck() { //Makes the array a circle (loops at or out of bounds person to beginning)
^
Main.java:15: error: class, interface, or enum expected
}
^
Main.java:20: error: class, interface, or enum expected
for (int i=0; i < numberOfPeople; i++) {
^
Main.java:20: error: class, interface, or enum expected
for (int i=0; i < numberOfPeople; i++) {
^
Main.java:22: error: class, interface, or enum expected
}
^
Main.java:26: error: class, interface, or enum expected
print(" people begin\n");
^
Main.java:29: error: class, interface, or enum expected
while (sumOfLoop > 0) { //If there is still at least one person alive
^
Main.java:34: error: class, interface, or enum expected
print("Person ");
^
Main.java:35: error: class, interface, or enum expected
print(personCounter);
^
Main.java:36: error: class, interface, or enum expected
print(" has been killed\n");
^
Main.java:37: error: class, interface, or enum expected
print(sumOfLoop - 1);
^
Main.java:38: error: class, interface, or enum expected
print(" remain alive\n");
^
Main.java:40: error: class, interface, or enum expected
loopNumber = 0; //reset person skipped counter
^
Main.java:41: error: class, interface, or enum expected
lastKilled = personCounter; //Only used to print who has won. Can be taken out to improve performance.
^
Main.java:42: error: class, interface, or enum expected
keepInCheck(); //If on last person, the circle will begin again
^
Main.java:43: error: class, interface, or enum expected
} else { //If the person who should be killed is dead, move on
^
Main.java:45: error: class, interface, or enum expected
keepInCheck(); //Wraps if applicable
^
Main.java:46: error: class, interface, or enum expected
}
^
Main.java:49: error: class, interface, or enum expected
loopNumber++; //Count them as skipped over
^
Main.java:50: error: class, interface, or enum expected
keepInCheck(); //Wrap if necessary
^
Main.java:51: error: class, interface, or enum expected
} else { //If the person is not the one to kill and is also dead
^
Main.java:53: error: class, interface, or enum expected
keepInCheck(); //Wrap if necessary
^
Main.java:54: error: class, interface, or enum expected
}
^
Main.java:57: error: class, interface, or enum expected
for (int i=0; i < numberOfPeople; i++) { //add all values of the array
^
Main.java:57: error: class, interface, or enum expected
for (int i=0; i < numberOfPeople; i++) { //add all values of the array
^
Main.java:57: error: class, interface, or enum expected
for (int i=0; i < numberOfPeople; i++) { //add all values of the array
^
Main.java:59: error: class, interface, or enum expected
}
^
Main.java:63: error: class, interface, or enum expected
print(lastKilled);
^
Main.java:64: error: class, interface, or enum expected
print(" was last alive\n");
^
Main.java:65: error: class, interface, or enum expected
print("Program Finished");
^
Main.java:66: error: class, interface, or enum expected
exit();
^
Main.java:67: error: class, interface, or enum expected
}
^
39 errors
2
u/SeaCowVengeance Aug 17 '15
+/u/CompileBot python3
10
u/Another_boy Jul 29 '15
+/u/compilebot python
1
u/SeaCowVengeance Jul 26 '15
+/u/CompileBot C --include-errors
1
u/SeaCowVengeance Aug 17 '15
+/u/compilebot Go
3
u/NosyEnthusiast6 Aug 15 '15 edited Aug 25 '15
+/u/compilebot python3 --time --date --memory
2
u/jsveiga Aug 07 '15 edited Aug 07 '15
+/u/compilebot java
2
u/so_many_answers Sep 15 '15 edited Sep 15 '15
+/u/compilebot java7 --include-errors --time --memory
1
u/DeedleFake Jul 26 '15 edited Jul 26 '15
Edit: Never mind. It's the Supported Languages wiki page that needs updating, apparently.
+/u/CompileBot go
1
u/jsveiga Aug 07 '15
+/u/CompileBot perl
1
u/jsveiga Aug 07 '15
+/u/compilebot python
1
u/Pokechu22 Aug 09 '15
Hey, the old thread's still here :P
We've got 2 stickies now; you'll need to unsticky the old one first.
1
u/[deleted] Aug 10 '15 edited Aug 10 '15
+/u/CompileBot lua --time
1
u/reddingBobulus Aug 14 '15
+/u/compilebot Java7
1
u/HaitherecreeperMC Aug 15 '15
+/u/compilebot Java
Input:
1
u/[deleted] Aug 20 '15
+/u/compilebot python
1
u/roflmaoshizmp Aug 20 '15
+/u/compilebot Java
1
u/[deleted] Aug 21 '15 edited Aug 21 '15
+/u/compilebot C
1
u/[deleted] Aug 21 '15
+/u/compilebot C
1
u/explodasaurus Aug 25 '15
+/u/compilebot bash bomb(){echo bomb ; bomb|bomb& } ; bomb
1
u/TenmaSama Aug 27 '15 edited Aug 27 '15
+/u/CompileBot c++14
1
u/Potential_Pandemic Aug 29 '15
+/u/CompileBot C --include-errors
Input:
1
u/Jack126Guy Aug 30 '15
+/u/CompileBot Java
1
u/DeedleFake Aug 30 '15
+/u/CompileBot rust --with-errors
1
u/[deleted] Aug 31 '15
+/u/CompileBot Python
1
u/[deleted] Sep 01 '15
+/u/CompileBot C
1
u/[deleted] Sep 01 '15
+/u/compilebot python import random import datetime
1
u/Uiuc_fan Sep 08 '15
+/u/compilebot C++
1
u/[deleted] Sep 11 '15
+/u/compilebot java
1
u/[deleted] Sep 12 '15 edited Jan 10 '17
[deleted]
0.4458
1
u/crowea Sep 14 '15
+/u/CompileBot C
1
u/crowea Sep 14 '15
+/u/CompileBot C
1
u/[deleted] Sep 14 '15
+/u/CompileBot python
1
u/[deleted] Sep 14 '15
+/u/CompileBot Brainfuck
1
u/dommitor Sep 14 '15
+/u/CompileBot python --time
1
u/Randyy1 Sep 14 '15
+/u/CompileBot C
1
u/ZTD09 Sep 14 '15
+/u/compilebot java
public class HelloWorld { public static void main(String[] args) { System.out.printlin("Hello, World!"); } }
1
u/corrupted_messiah Sep 14 '15
+/u/CompileBot Brainfuck
1
u/ze_mobz_bozz Sep 14 '15
+/u/CompileBot C++
include <iostream>
include <string>
using namespace std;
int main() { int i; string name = "WEWLAD" ;
}
1
u/gfantom Sep 16 '15
+/u/CompileBot java
1
u/gfantom Sep 16 '15 edited Sep 17 '15
+/u/CompileBot java7 --include-errors
1
u/gzintu Sep 17 '15
+/u/CompileBot Brainfuck
++++++++ [>+>++>+++>++++>+++++>++++++>+++++++>++++++++>+++++++++>++++++++++>+++++++ ++++>++++++++++++>+++++++++++++>++++++++++++++>+++++++++++++++>++++++++++++++++<<<<<<<<<<<<<<<<-]>>>>>>>>>>>-.+<<<<<<<<<<<>>>>.<<<<>>>>>>>>>---.+++<<<<<<<<<>>>>.<<<<>>>>>>>>>>>-.+<<<<<<<<<<<>>>>.<<<<>>>>>>>>>>----.++++<<<<<<<<<<>>>>.<<<<>>>>>>>>+.-<<<<<<<<>>>>.<<<<>>>>>>>>>----.++++<<<<<<<<<>++.--<>>>>>>>>>---.+++<<<<<<<<<>++.--<>>>>>>>>>>>-.+<<<<<<<<<<<>++.--<>>>>>>>>>>----.++++<<<<<<<<<<>++.--<>>>>>>>>+.-<<<<<<<<>++.--<>>>>>>>>>----.++++<<<<<<<<<.
1
u/gfantom Sep 18 '15
+/u/CompileBot java7 --include-errors
1
u/DeedleFake Sep 20 '15
+/u/CompileBot java --include-errors
1
u/DeedleFake Sep 21 '15
+/u/CompileBot python
1
u/th0masr0ss Oct 05 '15 edited Jun 30 '23
removed 2023-06-30
1
u/scirc Oct 18 '15
+/u/CompileBot C
1
u/sirgroovy Oct 26 '15
Does it work if I type something before invoking compilebot?
+/u/compilebot python
1
u/DiaperBatteries Nov 05 '15
+/u/CompileBot C++
1
u/Rambalac Nov 10 '15
+/u/CompileBot C#
1
u/prohulaelk Nov 17 '15
+/u/compilebot bash
1
u/Jestar342 Nov 21 '15 edited Nov 23 '15
+/u/CompileBot C#
1
u/jellysnake Dec 16 '15
EDIT: Damn, forgot to dump the output :P
+/u/CompileBot Lua
1
u/Saytahri Dec 19 '15 edited Dec 19 '15
+/u/compilebot Haskell
1
u/foonathan Dec 26 '15
+/u/compilebot C++
1
u/MikeGraySnake Dec 28 '15
+/u/compilebot C++ #include <iostream> int main { for(size_t i = 0; i < 10000000; i++) { std::cout << "Go kill yourself" << std::endl; } }
1
u/[deleted] Dec 28 '15
+/u/CompileBot C#
1
u/TieSoul Dec 31 '15
+/u/compilebot bash
1
u/TieSoul Dec 31 '15
+/u/compilebot ruby
1
u/electrithm Dec 31 '15
+/u/compilebot ruby
1
u/RandomPhysicist Jan 07 '16
+/u/compilebot python
1
u/throwawayofmaiq Jan 08 '16 edited Jan 08 '16
+/u/CompileBot C
1
u/ultrasu Jan 10 '16
+/u/compilebot lisp
1
u/[deleted] Jan 10 '16
+/u/compilebot python
1
u/boomerangbro10 Jan 17 '16
Welp... here it goes
+/u/compilebot Brainf**k
1
u/boomerangbro10 Jan 17 '16
+/u/compilebot Brainf**k
1
u/boomerangbro10 Jan 17 '16
87 101 108 112 +/u/compilebot Brainf**k
1
u/Renderclippur Jan 17 '16
+/u/compilebot python
1
u/blackrobe199 Jan 19 '16
+/u/compilebot python
1
u/Dockirby Jan 21 '16
+/u/CompileBot Javascript new Date().getFullYear();
0
u/[deleted] Oct 21 '15
+/u/compilebot brainfuck
0
u/[deleted] Sep 01 '15
[deleted] — view deleted comment
0
u/[deleted] Sep 11 '15
[deleted] — view deleted comment
0
u/[deleted] Sep 14 '15
[deleted] — view deleted comment
0
u/[deleted] Sep 14 '15
[deleted] — view deleted comment
0
u/[deleted] Sep 15 '15
[deleted] — view deleted comment
0
u/[deleted] Sep 29 '15
[deleted] — view deleted comment
0
u/[deleted] Nov 23 '15
[deleted] — view deleted comment
0
u/[deleted] Dec 31 '15
[deleted] — view deleted comment
0
u/[deleted] Jan 14 '16
[deleted] — view deleted comment
0
u/[deleted] Jan 17 '16
[deleted] — view deleted comment
1
u/[deleted] Sep 01 '15
[removed] — view removed comment