Here is a list of the 118 (current) elements of the periodic table (in a collapsed Stack Snippet for your convenience):
Hydrogen
Helium
Lithium
Beryllium
Boron
Carbon
Nitrogen
Oxygen
Fluorine
Neon
Sodium
Magnesium
Aluminium
Silicon
Phosphorus
Sulfur
Chlorine
Argon
Potassium
Calcium
Scandium
Titanium
Vanadium
Chromium
Manganese
Iron
Cobalt
Nickel
Copper
Zinc
Gallium
Germanium
Arsenic
Selenium
Bromine
Krypton
Rubidium
Strontium
Yttrium
Zirconium
Niobium
Molybdenum
Technetium
Ruthenium
Rhodium
Palladium
Silver
Cadmium
Indium
Tin
Antimony
Tellurium
Iodine
Xenon
Caesium
Barium
Lanthanum
Cerium
Praseodymium
Neodymium
Promethium
Samarium
Europium
Gadolinium
Terbium
Dysprosium
Holmium
Erbium
Thulium
Ytterbium
Lutetium
Hafnium
Tantalum
Tungsten
Rhenium
Osmium
Iridium
Platinum
Gold
Mercury
Thallium
Lead
Bismuth
Polonium
Astatine
Radon
Francium
Radium
Actinium
Thorium
Protactinium
Uranium
Neptunium
Plutonium
Americium
Curium
Berkelium
Californium
Einsteinium
Fermium
Mendelevium
Nobelium
Lawrencium
Rutherfordium
Dubnium
Seaborgium
Bohrium
Hassium
Meitnerium
Darmstadtium
Roentgenium
Copernicium
Ununtrium
Flerovium
Ununpentium
Livermorium
Ununseptium
Ununoctium
Note: This list was found by running the following JavaScript code on this Wikipedia page: [].slice.call($('.wikitable:first tr td:nth-child(3)').map(function(){return this.innerText})).slice(1,-1).join('\n')
Your challenge is to output as many of them as possible, in as many languages as possible. This goal is even further complicated by the fact that the radioactive elements are slowly eating away at your remaining usable characters as you go!
Rules
Your answer will consist of 1 to 95 code snippets.
Each code snippet must be in a different programming language. For the purpose of this challenge, I'm using a very loose definition of "language": Anything that's not backwards-compatible is a different language. For example, if all Lang A code works in Lang B but Lang B adds more, then they're considered the same language. But Python 2 and Python 3 are considered different, because
print 'foo'is valid in Python 2 but not in Python 3.The first code snippet may use some or all of the 95 printable ASCII characters. In the second snippet, one ASCII character of your choice will be forbidden. In the third snippet, that character plus one more of your choice must be forbidden. And so on. Tabs and newlines are never forbidden.
The forbidden character must have been used in the previous snippet, not in a comment, string literal, etc.; it must actually get interpreted by the compiler/interpreter. For example, if my first snippet is
print 'Hydrogen', I can't make&forbidden because I didn't use it. My choices are any of the charactersp,r,i,n,t, , or'(I can't useH,y,d, ... because those are in a string literal). The character you choose is from then on forbidden to appear at all in any subsequent snippets.Each code snippet must output a unique element of the periodic table (found in the list above). "Output" can be done by any method you wish: STDOUT, an alert box (ex. in JS), REPL "output" (keep in mind that if it includes quotes, it's invalid), writing to a file, etc.
You must either take no input, or an empty string as input (for languages like sed).
You may not use built-in functions that return the element name (ex.
ElementDatain Mathematica).
Formatting
Please format your answer with the following format:
### 1. Language A - none forbidden
code
Optional commentary on this snippet goes here.
### 2. Language B - `a` forbidden
code
More optional commentary
### 3. Language C - `ab` forbidden
code
More optional commentary
etc.
If backticks (`) are forbidden, simply use two backticks around the list instead. For example, ``ab`cd`` will result in ab`cd. (If the backtick is the first or last character, you must also pad the outer backticks with spaces; ex. `` abc` `` -> abc`.)
Scoring
The answer with the most programming languages will win. In the event of a tie, the answer with the smallest cumulative character count of all of the programs will win.
This question was inspired by this.
5 Answers 5
51 Languages
I might add to this later, but here are 51 languages.
1. Java - none forbidden
public class p{public static void main(String[]J){System.out.println("Tellurium");}}
2. C++ - J forbidden
#include<cstdio>
main(){int Q=std::puts("Palladium");}
3. C - JQ forbidden
main(W){puts("Neodymium");}
4. D - JQW forbidden
import std.stdio;void main(string[]z){write("Zirconium");}
5. Nimrod - JQWz forbidden
var q="Ruthenium"
echo q
6. Fortran-95 - JQWzq forbidden
program Y
print *,"Potassium"
end program Y
7. Batch - JQWzqY forbidden
@set @c=Aluminium&echo %@c%
8. Befunge - JQWzqY% forbidden
"muinoloP">:#,_@
Output Polonium.
9. Vala - JQWzqY#% forbidden
int main(string[]@a){print("Manganese");return 0;}
10. Bash - JQWzqY#%@ forbidden
cd /usr/bin ~/cake;./echo Germanium
11. ECMAScript 6 - JQWzqY#%@~ forbidden
alert(`Strontium`)
12. Perl 5 - JQWzqY#%@~` forbidden
$_=Magnesium;say
13. Scala - JQWzqY#%@~`_ forbidden
object e{def main(args:Array[String]){print("\u0059tterbium")}}
14. Perl 6 - JQWzqY#%@~`_: forbidden
$j='Lanthanum';say
15. Python 2 - JQWzqY#%@~`_:j forbidden
print'Lutetium'
16. Python 3 - JQWzqY#%@~`_:jL forbidden
print('Krypton')
17. PHP - JQWzqY#%@~`_:jLK forbidden
$n='Berkelium';echo$n;
18. Pascal - JQWzqY#%@~`_:jLK$ forbidden
Program f(X);begin write('Ununtrium');end.
19. POGAACK - JQWzqY#%@~`_:jLK$X forbidden
poock!pogack?poock!pock!pock!pock!pock!pock!pock!pogack!pogaaack!pogaack!pogaack?pogack!poock!pogaaack?pogack?poock!pock!pock!pogack!pogaaack!pock!pock!pock!pock!pogaack!pogaack?pogack!pogaaack!pogaaack?poock!pock!pogack?poock!pogack!pogaaack!pock!pock!pogaack!pogaack?pogack!poock!pogaaack?pogaaack!pock!pock!pock!pock!pock!pock!pock!pock!pock!pock!pock!pock!pock!pogaaack?poock!pock!pock!pogaaack?poock!pock!pock!pock!pock!pock!pock!pock!pogaaack?poock!pock!pogaaack?pogaaack!pock!pock!pock!pock!pock!pock!pock!pogaaack?
Prints Hydrogen.
20. COW - JQWzqY#%@~`_:jLK$Xg forbidden
MoOMoOMoOMoOMOOmoOMoOMoOMoOMoOMoOmOoMOomoomoOMOOmoOMoOMoOMoOMoOmOoMOomoomoOMooMoOMOOMOoMOoMOomoOMoOMoOMoOMoOmOomoomoOMooMoOMoOMoOMoOMoOMoOMoOMoOMoOMooMOoMooMOoMOoMOoMOoMOoMooMOoMooMOoMOoMOoMOoMOoMooMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMooMOoMOoMOoMOoMOoMOoMOoMOoMoo
Prints Plutonium.
21. Blub - JQWzqY#%@~`_:jLK$XgM forbidden
Blub!Blub!Blub!Blub?Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub.Blub?Blub.Blub.Blub?Blub.Blub?Blub!Blub.Blub?Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub.Blub!Blub!Blub!Blub!Blub!Blub?Blub!Blub!Blub!Blub!Blub!Blub!Blub.Blub?Blub.Blub.Blub?Blub.Blub?Blub!Blub.Blub?Blub!Blub.Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub!Blub.Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub!Blub.Blub!Blub?Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub.Blub?Blub.Blub.Blub?Blub.Blub?Blub!Blub.Blub?Blub!Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub.Blub!Blub.Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub!Blub.
Prints Flerovium.
22. Ook!- JQWzqY#%@~`_:jLK$XgMB forbidden
Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook?Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook.Ook?Ook.Ook.Ook?Ook.Ook?Ook!Ook.Ook?Ook.Ook.Ook.Ook.Ook!Ook.Ook!Ook?Ook!Ook!Ook!Ook!Ook!Ook!Ook.Ook?Ook.Ook.Ook?Ook.Ook?Ook!Ook.Ook?Ook.Ook.Ook.Ook.Ook!Ook.Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook!Ook.Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook.Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook!Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook.Ook!Ook.Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook!Ook.
Prints Americium.
23. Ruby - JQWzqY#%@~`_:jLK$XgMB! forbidden
def e?()return "Neptunium"end;print e?
24. Lua - JQWzqY#%@~`_:jLK$XgMB!? forbidden
f=2*4 if f==8then print("Titanium")end
25. R - JQWzqY#%@~`_:jLK$XgMB!?* forbidden
U<-"Rubidium";print(U)
26. Scheme - JQWzqY#%@~`_:jLK$XgMB!?*U forbidden
(display "Francium")
27. TI Basic - JQWzqY#%@~`_:jLK$XgMB!?*U) forbidden
Disp ("Vanadium"
28. REXX - JQWzqY#%@~`_:jLK$XgMB!?*U)( forbidden
do Z=1 to 1
say 'Europium'
end
return
29. BASIC (Yabasic) - JQWzqY#%@~`_:jLK$XgMB!?*U)(Z forbidden
PRINT "Chromium"
30. Pyth - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI forbidden
|0"Scandium
31. CJam - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI| forbidden
"Nobelium"1\\-
32. GolfScript - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\ forbidden
"Samarium"1/
33. Brainfuck - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/ forbidden
,>-[--->+<]>-----.+[--->++++<]>.-----------.--[--->+<]>-.-----------.+++++.+++++++.--------.
Takes an empty string as input.
34. Haskell - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/, forbidden
'Antimon'++['y']
35. Deadfish - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[ forbidden
iisiiiisiiiiiioiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiioiiiiiiiiioddddddoiiiodddddddddoiiiiiodddddddddo]
One of the few of these snippets to output a newline afterwards.
36. Rebmu - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[] forbidden
PR"Tungsten"
37. Tcl - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P forbidden
puts "Actinium"
38. There Once was a Fish Named Fred - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P" forbidden
a named a a a once was there Fred once a a fish named a a a a a once was was was there Fred once fish was was was was was was was fish a a a a a a a fish was was was was was was was was was fish a a a a a fish was was was was was was was was was was was was fish a a a a a a a a fish
Prints Selenium.
39. BrainFNORD - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"F forbidden
eris 23 eris eris eris fnord hail pineal 5 fnord eris eris eris eris eris eris eris kallisti 23 eris eris eris fnord hail hail hail hail pineal 5 fnord hail kallisti hail hail hail hail hail hail hail hail hail hail hail kallisti eris eris kallisti eris eris eris kallisti eris eris eris eris eris eris eris eris kallisti eris eris kallisti hail hail hail hail hail hail hail hail hail kallisti
Prints Nitrogen.
40. Text - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"Fl forbidden
Astatine
41. J - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"Fln forbidden
'Caesium'
42. Pi - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"Fln' forbidden
3.4743302180342223222232222423222332223225222222427402331802252232322322343223322224434433435
Prints Tantalum.
43. Marbelous - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"Fln'. forbidden
43686C7072696E65
-- }0
Prints Chlorine. This relies on the use of spaces for empty cells. Marbelous Interpreter
44. DNA# - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"Fln'.} forbidden
ATCGGCTAATCGATCGATCGATATATTAATGCGCCGATATATCGGCATGCTAATCGATCGATCGATCGATATATTAATTAATTAATTAATTAATGCGCCGATATATCGGCATATCGATCGATCGATCGATCGATCGATCGGCATATTAATTAATTAATTAATTAATTAATTAATTAATTAATTAATTAGCATGCATATCGATCGATCGGCATATTAATTAATTAATTAATTAATTAATTAATTAATTAATTAATTAATTAGCATATCGATCGATCGATCGATCGATCGATCGATCGGCAT
Prints Thallium.
45. oOo - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"Fln'.}G forbidden
OoOOoOOoOOoOoOoOoOOoOOoOOoOoooOooOooOooooOoOOoooOooOOoOooOooOoooOoOooOooOooOooOoooooOoOooOoOOoooOooOOoOooOooOooOOoOooOooOOoOooOooOooOooOOoOoOOoOOoOOoOOoOOOoOooOooOooOooOooOooOooOooOooOOo
Prints Bromine.
46. ABC - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"Fln'.}GO forbidden
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAACAAAAAC
Prints Tin. Note that the interpreters on esolang are all unavailable. However, 4chan's implementation written in Scheme works (#59).
47. WASD - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"Fln'.}GOC forbidden
w1sssdwwa2dwwwe1sssdwa2dweessesssssssssewwwwwwwwwwwwesssssssse
Prints Yttrium.
48. Super Stack! - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"Fln'.}GOCw forbidden
99 105 110 101 115 114 65
if outputascii fi
Prints Arsenic.
49. Golunar - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"Fln'.}GOCws forbidden
1334726751425099782624362025339077479253628945660119316869724137277474322140
Prints Lithium.
50. Unary - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"Fln'.}GOCws1 forbidden
The source is 0 repeated
40732627912143966203790325934799402365062057246763194506454552300861148
times.
Prints Hassium.
51. Lenguage - JQWzqY#%@~`_:jLK$XgMB!?*U)(ZI|\/,[]P"Fln'.}GOCws10 forbidden
The source is > repeated
9305604867582777545366404070305393137665254080212227303922021923795365639900
times.
Prints Bohrium.
Most of the odd languages used can be found on the esolangs wiki.
Please note that all brainfuck (and brainfuck derivatives) snippets were written with 8-bit cells in mind.
-
\$\begingroup\$ Sorry but all those
2was pretty strange for Pi language so I ran it on my interpreter (migl.io/projects/pi), actually it returnsª·ÄÊcnw. \$\endgroup\$Michael M.– Michael M.2014年11月02日 13:06:55 +00:00Commented Nov 2, 2014 at 13:06 -
\$\begingroup\$ @Mig
2is repeated a lot since for any digit of pi greater than or equal to3, it represents+. The Pi code used in my answer requires 8-bit cells (it begins by decrementing 0), and produces the correct output on the interpreter in the esolang page for Pi. \$\endgroup\$es1024– es10242014年11月02日 22:30:09 +00:00Commented Nov 2, 2014 at 22:30
95 languages (all characters used!)
(TODO: a couple more answers that I have planned out but not implemented)
1. COBOL - forbids A
PROGRAM-ID.g.PRODECURE DIVISION.DISPLAY"Ununtrium".
Prints Ununtrium.
2. REBOL - forbids B
REBOL[]prin"Tellurium"
Prints Tellurium.
3. bc - forbids ^
a=0^0
"Strontium"
Prints Strontium.
4. D - forbids D
void main(char[][]D){printf="Ruthenium";}
Prints Ruthenium.
5. Java - forbids E
enum E{E;{System.out.print("\x41luminium");}}
Prints Aluminium.
6. Scala - forbids F
val F=print("Plutonium")
Prints Plutonium.
7. Rust - forbids G
fn main(){let G:u8;print("\x41mericium")}
Prints Americium.
8. Nim - forbids &
discard 0&0
echo "Neptunium"
Prints Neptunium.
9. C# - forbids C
class V{static void Main(){System.Console.Write("Neodymium");}}
Prints Neodymium.
10. Burlesque - forbids %
,1 1.%vv"Manganese"Q
Prints Manganese.
11. Nemerle - forbids I
Nemerle.IO.print("Magnesium")
Prints Magnesium.
12. Ada - forbids J
procedure gnat.io.J is begin put("Palladium");end;
Prints Palladium.
13. Go - forbids |
package main
func main(){if 1|1>0{print("Germanium")}}
Prints Germanium.
14. K - forbids ```
`0:"Ytterbium"
Prints Ytterbium.
15. Erlang - forbids /
-module(test).
-export([m/0]).
m()->io:put_chars("\x42eryllium").
Prints Beryllium.
16. Prolog - forbids :
m:-write('102円erkelium').
Prints Berkelium.
17. Smalltalk - forbids K
K:=0.'Lanthanum'display
Prints Lanthanum.
18. PARI/GP - forbids L
print(Potassium)
Prints Potassium.
19. REXX - forbids M
M=0
say "Tungsten"
Prints Tungsten.
20. LilyPond - forbids N
#(let((N 0))(print"\x46levorium"))
Prints Flevorium.
21. Arc - forbids Q
(let Q 1(pr "\x41ntimony"))
Prints Antimony.
22. Common LISP - forbids R
(let((R 0))(princ"Tantalum"))
Prints Tantalum.
23. Clojure - forbids U
(def U)(pr'Selenium)
Prints Selenium.
24. Logo - forbids Z
to Z
end
pr[Scandium]bye
Prints Scandium.
25. Groovy - forbids W
print"Samarium";W=0
Prints Samarium.
26. Asymptote - forbids X
write('\x52ubidium');int X=0;
Prints Rubidium.
27. Octave - forbids Y
Y=0;disp Yttrium
Prints Yttrium.
28. gnuplot - forbids V
V=0;prin"Vanadium
Prints Vanadium.
29. Kite - forbids z
z=0;"\x4eobelium"|print;
Prints Nobelium.
30. Squirrel - forbids _
print("\x4eitrogen");local _=0;
Prints Nitrogen.
31. Curry - forbids v
v=v;main=putStr"\x4cutetium"
Prints Lutetium.
32. Fortran - forbids q
q=0;print'("Thallium")';end
Prints Thallium.
33. Pascal - forbids l
begin;var l:integer;write(#70#114#97#110#99#105#117#109)end.
Prints Francium.
34. PHP - forbids k
<?=$k="70円108円117円111円114円105円110円101円";
Prints Fluorine.
35. Haskell - forbids S
main=putStr"Sodium"
Prints Sodium.
36. C++ - forbids ~
#include<cstdio>
main(){~puts("\x41ctinium");}
Prints Actinium.
37. ObjC - forbids j
main(j){puts("Hydrogen");}
Prints Hydrogen.
38. Lua - forbids g
print("65円statine")
Prints Astatine.
39. JavaScript - forbids b
alert("\x43h\x6corine")
Alerts Chlorine.
40. Bash - forbids h
echo Osmium
Prints Osmium.
41. Cyan - forbids o
say"Hassium"
o=0
Prints Hassium.
42. J - forbids d
wd'Titanium'
Prints Titanium.
43. Scheme - forbids x
(let((x 0))(print"Vana\x64ium"))
Prints Vanadium.
44. C - forbids {
main(){puts("\x55ranium");}
Prints Uranium.
45. FORTH - forbids m
84 emit
104 emit
111 emit
114 emit
105 emit
117 emit
109 emit
Prints Thorium.
46. BASIC - forbids T
T$="Tin"
?T$
Prints Tin.
47. Perl 6 - forbids y
say "\o124\o145\o162\o142\o151\o165\o155"
Prints Terbium.
48. Asdf - forbids a
asaasaasssasaasssassaasaasssaasaasssaasaasssaasaasssaasaasssasaasssassaasaasssasaasssassasaasssassasaasssassaasaasssaasaasssasaasssassaasaasssaasaasssasaasssassasaasssassasaasssassaasaasssaasaasssasaasssassasaasssassaasaasssasaasssassasaasssassaasaasssaasaasssasaasssassaasaasssasaasssassaasaasssasaasssassasaasssassaasaasssasaasssassasaasssassasaasssassaasaasssaasaasssasaasssassasaasssassaasaasssasaasssassaasaasssaasaasssasaasssassaasaasssasaasssassasaasssassaasaasssaasaasssaasaasssasaasssassasaasssass
Prints Arsenic. Generating script.
49. Tcl - forbids s
puts "123円151円154円151円143円157円156円"
Prints Silicon.
50. Perl - forbids ;
print"122円150円157円144円151円165円155円";
Prints Rhodium.
51. Python - forbids r
print"103円150円162円157円155円151円165円155円"
Prints Chromium.
52. WARP - forbids =
=nn0(82(104(110(105(117(109
Prints Rhenium.
53. ETA - forbids n
nnOtOe nHHOne enenteht O
nnHHHe nHHtOe enenteht O
nntOHe nHHtne enenteht O
nnHnHe nHHtne enenteht O
nntnte nHHtne enenteht O
nHOHne nHHHte enenteht O
Prints Bromine.
54. Axo - forbids \
99*3+(94+8*('u'(93+9*(35*7*('fu'(7+(\
Prints Thulium.
55. Ruby - forbids t
putc 69
putc 117
putc 114
putc 111
putc 112
putc 105
putc 117
putc 109
Prints Europium.
56. DBFV! - forbids u
u<9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u6 u>
u<9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u6 u>
u<9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u3 u>
u<9 *u9 *u9 *u9 *u9 *u9 *u9 *u8 u>
u<9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u6 u>
u<9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 u>
u<9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u9 *u6 *u4 u>
Prints Niobium. Each space is actually a newline.
57. Mouse - forbids '
77 !' 101 !' 114 !' 99 !' 117 !' 114 !' 121 !'
Prints Mercury.
58. Word - forbids f
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.
Prints Cadmium.
59. Ftack - forbids $
H 109 117 105 104 116 105 $ 1 76
Prints Lithium.
60. WASD - forbids e
We introduce the concept of the trivial Brainfuck solution (TBS): we can print any character in 257 Brainfuck commands by incrementing the accumulator c times, outputting, then incrementing it (256-c) more times to reset it. Repeating this for each character in the string yields the solution. Whenever we have two subprograms i and o that function exactly like Brainfuck's + and ., we call the translated TBS the (i, o)-TBS.
Instead of wrapping around we might be able to set the accumulator to zero after printing using some subprogram o'. This is the (i, o')-zeroing TBS.
Alternatively, we might have no wrapping but a subprogram d that decrements the accumulator. This is a the (i, o, d)-TBS.
For WASD a (w, e)-TBS prints Silver.
61. URSL - forbids w
A (i1, w1, c1)-TBS prints Krypton.
62. Emmental - forbids #
#73#114#105#100#105#117#109
Prints Iridium.
63. Owl - forbids ?
0[]?83)117)108)102)117)114)
Prints Sulfur.
64. RUBE - forbids )
+ + + +
8478 666 667 6965767 6 )
cccccccccccccccccccccccc
........................
O
c
.
Prints Holmium.
65. Headsecks - forbids (
A ((, ")-TBS prints Bohrium.
66. FALSE - forbids [
[]!71,97,108,105,117,109,
Prints Gallium.
67. Betterave - forbids -
,-,++66,-,+8,+5,+*55,*8958
Prints Hafnium.
68. Kipple - forbids >
70>o 101>o 114>o 109>o 105>o 117>o 109>o
Prints Fermium.
69. GolfScript - forbids ]
68]117]98]110]105]117]109]""^
Prints Dubnium.
70. FlogScript - forbids "
67"P.97"P.108"P.99"P.105"P.117"P.109"P.
Prints Calcium.
71. OOo CODE - forbids p
A (PpP, PPp)-TBS prints Bismuth.
72. dc - forbids P
67P97P100P109P105P117P109P
Prints Cadmium.
73. Capuirequiem - forbids O
82O97O100O105O117O109O
Prints Radium.
74. BitChanger - forbids }
TODO
Prints Cobalt.
75. Vrejvax - forbids <
TODO
Prints Cerium.
76. Fueue - forbids H
80 111 108 111 110 105 117 109 H
Prints Polonium.
77. Pi - forbids 6
Run bf2pi from the wiki article on a trivial Brainfuck solution to print Xenon.
78. CJam - forbids 5
A (1+, c 0)-zeroing TBS (with 0 prepended) prints Nickel.
79. Wordfuck - forbids 9
A (9999, 99)-TBS prints Carbon.
80. Lenguage - forbids 7
≈ 3^(257*4*3) sevens
See 91-94 (use only 7.) Prints Radon.
81. Binaryfuck (hexadecimal) - forbids 4
TODO
Prints Barium.
82. CaneCode - forbids 8
A (1, 8)-TBS prints Iodine.
83. Numberwang - forbids 3
A (2, 3)-TBS prints Indium, but 2 decrements instead of incrementing, so subtract each character code from 256 first.
84. ferNANDo - forbids 2
1 1 1
2 1 2 2 2 2 2 1
2 1 1 1 2 2 1 2
2 1 1 2 2 1 1 1
2 1 1 2 1 1 1 1
2 1 1 2 1 1 1 2
Prints Argon.
85. Unefunge-98 - forbids @
Prepending 0 to a (1+, ,0)-zeroing TBS, and appending @, prints Helium.
86. Whirl - forbids 1
Prepending One Load Zero to an (Add, AscIO Zero)-zeroing TBS prints Boron.
87. ReverseFuck - forbids ,
A (-, ,)-TBS prints Erbium.
88. Brainfuck - forbids +
A (+, .)-TBS prints Curium.
89. Deadfish~ - forbids c
An (i, c)-TBS prints Copper.
90. Iota - forbids i
We compute a Church-numeral base-256-decoding to Zinc to make up for Iota's lack of IO. Define
succ = ***i*i*i*ii***i*i*i*ii**i*i*ii*i*i*i*ii*i*i*ii
Then the solution is 1516858978 repetitions of succ followed by *ii, for a total length of 69775512991 bytes.
Unary-like programs
The following four solutions (and 70) are similar: they all consist of approximately 3^(257*4*3) repetitions of the character they forbid (except Ellipsis is thrice as long). The exact value is decided by converting the TBS to octal as described on the wiki.
91. Ellipsis - forbids .
≈ 3^(257*4*3+1) periods
Prints Neon.
92. Ecstatic - forbids !
≈ 3^(257*4*3) exclamation marks
Prints Lead.
93. MGIFOS - forbids *
≈ 3^(257*4*3) asterisks
Prints Iron.
94. Unary - forbids 0
≈ 3^(257*4*3) zeros
Prints Gold.
95. Whitespace - forbids space
The Whitespace program generated by this Python script:
import sys
for c in 'Oxygen':
print ' ' + ''.join(' \t'[int(b)] for b in bin(ord(c))[2:])
sys.stdout.write('\t\n ')
print '\n\n'
prints Oxygen.
-
\$\begingroup\$ So... you use the characters you forbid in almost every program? \$\endgroup\$Rodolfo Dias– Rodolfo Dias2014年11月10日 07:35:02 +00:00Commented Nov 10, 2014 at 7:35
-
2\$\begingroup\$ When I write "forbids
x", I really mean "usesxand forbids it for the next solutions". The string became unmanageable otherwise. \$\endgroup\$lynn– lynn2014年11月10日 14:46:13 +00:00Commented Nov 10, 2014 at 14:46 -
\$\begingroup\$ Oh, OK. Although having them all together would make it easier to look for any mistakes :) \$\endgroup\$Rodolfo Dias– Rodolfo Dias2014年11月10日 14:56:17 +00:00Commented Nov 10, 2014 at 14:56
(削除) 20 (削除ここまで) 24 languages
Here's something to get the ball rolling. I decided to do the elements in order because I don't know enough languages for the order to matter much.
1. C# - none forbidden
public class P{public static void Main(){System.Console.Write("Hydrogen");}}
2. PHP - W forbidden
echo$e="Helium";
3. QBasic - W$ forbidden
?"Lithium"
4. Windows Batch Script - W$? forbidden
dir>nul&echo Beryllium
5. Brainf*** - W$?& forbidden
++++++[>+++++++++++<-]>.----------[>++<-]-.+++.---.-.
Outputs Boron.
6. C++ - W$?&+ forbidden
#include<iostream>
main(){std::cout<<"Carbon";}
7. Befunge - W$?&+< forbidden
"n eg or ti N">,_@
Outputs Nitrogen.
8. Bash - W$?&+<@ forbidden
echo Oxygen 2>1
9. Sisi - W$?&+<@> forbidden
9 print "Fluorine"
10. C - W$?&+<@>9 forbidden
#include"stdio.h"
main(){printf("Neon%c",10);}
11. Common Lisp - W$?&+<@>9, forbidden
(format t "~Codium" #\S)
12. Zephyr - W$?&+<@>9,# forbidden
if 1\=0:print"Magnesium";end if
13. Prolog - W$?&+<@>9,#\ forbidden
:-write('Aluminium').
(Test here.)
14. Java - W$?&+<@>9,#\: forbidden
class A{public static void main(String[]a){System.out.print("Silicon");}}
15. Golfscript - W$?&+<@>9,#\:. forbidden
];"Phosphorus"
16. Pyth - W$?&+<@>9,#\:.] forbidden
|0"Sulfur
17. ActionScript - W$?&+<@>9,#\:.]| forbidden
trace("Chlorine");
18. PowerShell - W$?&+<@>9,#\:.]|; forbidden
write-host"Argon"
Fortunately, PowerShell commands can be written in lowercase, avoiding the forbidden W.
19. JavaScript - W$?&+<@>9,#\:.]|;- forbidden
alert("Potassium")
20. Python 3 - W$?&+<@>9,#\:.]|;-" forbidden
print('Calcium')
21. Python 2 - W$?&+<@>9,#\:.]|;-"( forbidden
print'Scandium'
22. Perl - W$?&+<@>9,#\:.]|;-"(' forbidden
say q{Titanium}
23. Ruby - W$?&+<@>9,#\:.]|;-"('{ forbidden
puts %q!Vanadium!
24. CJam - W$?&+<@>9,#\:.]|;-"('{! forbidden
67c104c114c111c108)c105c117c108)c
Outputs Chromium. ) increments were used to avoid the forbidden 9 in 109 (m).
-
\$\begingroup\$ sed seems to complain:
sed: -e expression #1, char 0: no previous regular expression- maybe trys/./Beryllium/ors/^/Beryllium/? \$\endgroup\$user16402– user164022014年11月02日 08:23:01 +00:00Commented Nov 2, 2014 at 8:23 -
1\$\begingroup\$ Don't you need the function declaration for C and C++? \$\endgroup\$Beta Decay– Beta Decay2014年11月02日 09:36:10 +00:00Commented Nov 2, 2014 at 9:36
-
\$\begingroup\$ @professorfish Good catch--I didn't get a chance to test all of these. Now that I have, sed (v 4.2.1 on Ubuntu 12.04) doesn't give an error or indeed do anything on an empty input as specified by the OP. (I.e.
echo -n | sed -e 's/^/Beryllium/'.) I may replace it with something else. \$\endgroup\$DLosc– DLosc2014年11月02日 20:04:49 +00:00Commented Nov 2, 2014 at 20:04 -
\$\begingroup\$ @BetaDecay Fixed. \$\endgroup\$DLosc– DLosc2014年11月03日 04:58:59 +00:00Commented Nov 3, 2014 at 4:58
23 Languages
I set out to beat the 20 language answer... and now I can't be bothered to shoot for 52. ;)
1. Mathematica - none forbidden
J;"Krypton"
2. Ruby - J forbidden
K=1;puts 'Vanadium'
3. Python 2 - JK forbidden
Q=1;print 'Xenon'
4. Python 3 - JKQ forbidden
X=1;print('Osmium')
5. PHP - JKQX forbidden
$V=1;echo 'Oxygen';
6. Julia - JKQXV forbidden
O=1;println('Ytterbium')
7. JavaScript - JKQXVO forbidden
Y=1;alert('Yttrium')
8. CoffeeScript - JKQXVOY forbidden
q=1;alert 'Zinc'
9. C - JKQXVOYq forbidden
main(Z){printf("Zirconium");}
10. C++ - JKQXVOYqZ forbidden
#include <cstdio>
int main(){int x;printf("Lawrencium");}
11. Matlab - JKQXVOYqZx forbidden
w=1;'Nickel'
12. Perl - JKQXVOYqZxw forbidden
$k=1;print "Berkelium";
13. Perl 6 - JKQXVOYqZxwk forbidden
$f=1;say'Darmstadtium';
14. Java - JKQXVOYqZxwkf forbidden
public class p{public static void main(String[]v){System.out.println("Dubnium");}}
15. Marbelous - JKQXVOYqZxwkfv forbidden
44797370726F7369756D
Prints Dysprosium.
16. Lua - JKQXVOYqZxwkfvD forbidden
G=1;print("Erbium")
17. Octave - JKQXVOYqZxwkfvDG forbidden
F=1;disp('Einsteinium');
18. Rust - JKQXVOYqZxwkfvDGF forbidden
fn main(){let E=1;println!("Europium");}
19. Fortran - JKQXVOYqZxwkfvDGFE forbidden
print *,"Indium"
20. CJam - JKQXVOYqZxwkfvDGFEp forbidden
H;"Iodine"
21. Golfscript - JKQXVOYqZxwkfvDGFEpH forbidden
U"Iridium"
22. Pyth - JKQXVOYqZxwkfvDGFEpHU forbidden
I1"Iron
I think this should be
if 1:
print "Iron"
23. Brainfuck - JKQXVOYqZxwkfvDGFEpHUI forbidden
++++++++[>+>++>+++>++++>+++++>++++++>+++++++>++++++++>+++++++++>++++++++++>+++++++++++>++++++++++++>+++++++++++++>++++++++++++++>+++++++++++++++>++++++++++++++++<<<<<<<<<<<<<<<<-]>>>>>>>>++.--<<<<<<<<>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<>>>>>>>>>>>>>>++.--<<<<<<<<<<<<<<>>>>>>>>>>>>>>>+.-<<<<<<<<<<<<<<<>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<>>>>>>>>>>>>>+.-<<<<<<<<<<<<<>>>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<<<>>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<<.
Prints Beryllium.
-
2\$\begingroup\$ Your Pyth answer does what you think it does :) \$\endgroup\$FryAmTheEggman– FryAmTheEggman2014年11月02日 16:36:26 +00:00Commented Nov 2, 2014 at 16:36
-
\$\begingroup\$ How did you forbid G in language 17? There isn't a G in the Lua answer... \$\endgroup\$Beta Decay– Beta Decay2014年11月03日 07:08:21 +00:00Commented Nov 3, 2014 at 7:08
(削除) 20 (削除ここまで) (削除) 21 (削除ここまで) 26 languages
Okay, let's see if I can do something out of this, not even trying to aim for top spot... if I can get 20 languages without any mistakes I'll be more than happy.
1. JAVA - none forbidden
class J{public static void main(String[]a){System.out.print("Hydrogen");}}
Prints Hydrogen.
2. Pascal - J forbidden
Program H; begin write('Helium'); end.
Prints Helium.
3. C - JP forbidden
#include <stdio.h> main(){printf("Lithium");}
Prints Lithium.
4. PHP - JPf forbidden
<?php echo "Beryllium";?>
Prints Beryllium.
5. C# - JPf? forbidden
using System;class O{static void Main(){Console.Write("Boron");}}
Prints Boron.
6. PROLOG - JPf?W forbidden
:-initialization(main). main:-write('Carbon').
Prints Carbon - tested here.
7. JavaScript - JPf?W' forbidden
<html>
<script language="javascript" type="text/javascript">
alert("Nitrogen");
</script>
</html>
Prints Nitrogen.
8. LOLCODE - JPf?W'= forbidden
HAI
VISIBLE "Oxygen"
KTHXBYE
Prints Oxygen.
9. Befunge '93 - JPf?W'=K forbidden
"eniroulF">:#,_@
Prints Fluorine - tested here.
10. Visual Basic - JPf?W'=K@ forbidden
Module V
Sub Main()
Console.WriteLine("Neon")
End Sub
End Module
Prints Neon.
11. HTML5 - JPf?W'=K@M forbidden
Sodium
Prints Sodium - inspired by this answer.
12. Brainfuck - JPf?W'=K@M& forbidden
++[---------->+<]>.-[------>+<]>-.++++++.+++++++.---------.[--->+<]>----.----------.++++++++++++.--------.
Prints Magnesium - tested here.
13. JSFuck - JPf?W'=K@&M< forbidden
(+![]+[][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+([][[]]+[])[+[]]+((+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+[]]+((+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]
Prints Aluminium - tested here.
14. Bash - JPf?W'=K@&M<[ forbidden
#!/bin/bash
echo "Silicon"
Prints Silicon.
15. Assembly NASM - JPf?W'=K@&M<[! forbidden
section .text
global _start
section .data
msg db "Phosphorus"
len equ $ - msg
_start:
mov edx, len
mov ecx, msg
mov ebx, 1
mov eax, 4
int 0x80
mov eax, 1
int 0x80
Prints Phosphorus- tested here.
16. D - JPf?W'=K@&M<[!$ forbidden
import std.stdio;void main(){write("Chlorine");}
Prints Chlorine.
17. Fortran '95 - JPf?W'=K@&M<[!$d forbidden
program C
print *, "Argon"
end program C
Prints Argon - tested here.
18. Lua - JPf?W'=K@&M<[!$d* forbidden
print("Sul\x66ur")
Prints Sulfur - tested here.
19. Golfscript - JPf?W'=K@&M<[!$dt forbidden
U"\x50o\x74assium"
Prints Potassium - tested here.
20. Perl 5 - JPf?W'=K@&M<[!$*dU forbidden
use v5.10;
say "Calciu\x{6d}";
Prints Calcium - tested here.
21. Nimrod - JPf?W'=K@&M<[!$*dUu forbidden
echo "Scan\x64i\x75m"
Prints Scandium.
22. Python - JPf?W'=K@&M<[!$*dUuh forbidden
print "Titani165円m";
Prints Titanium.
23. Unlambda - JPf?W'=K@&M<[!$*dUuh; forbidden
`r````.I.r.o.ni
Prints Iron. - tested here.
24. Forth - JPf?W'=K@&M<[!$*dUuh;` forbidden
\
.( Cobalt) CR
Prints Cobalt - tested here.
25. Lua - JPf?W'=K@&M<[!$*dUuh;`\ forbidden
print("Nickel")
Prints Nickel - tested here
26. Emoticon - JPf?W'=K@&M<[!$*dUuh;`\p forbidden
Zinc :-Q
Prints Zinc- tested here
Oh well, I think that's about enough for me.
-
1\$\begingroup\$
s/Nytrogen/Nitrogen/g; otherwise, nice job (and props for using Pascal, Fortran, and Assembly). \$\endgroup\$DLosc– DLosc2014年11月08日 19:47:30 +00:00Commented Nov 8, 2014 at 19:47
cout<<"Hydrogen";in C++? Do we need to includeincludes in the code? Does a program need to print a newline after the name of the element? \$\endgroup\$