Comments on Print the alphabet using alphabetic source
Post
Print the alphabet using alphabetic source
+2
−0
The task is to write a program that takes no input and prints the English alphabet in upper-case letters. It can be printed either as a single line ABCDEFGHIJKLMNOPQRSTUVWXYZ
, or as letters separated by spaces, or as letters separated by new line.
This is code golf, so the shortest program in each programming language wins. However, there are special rules for this challenge:
- The source code must be formatted in multiple lines, 26 in total.
- The first letter symbol encountered on each line in the source must correspond to a letter in the alphabet, upper or lower case, and they must be placed in alphabetic order. So the first letter found on the first line must be
A
ora
, the first letter on the next line must beB
orb
and so on. - Only the first letter encountered on that line counts as the letter for that line.
- Other symbols that are not letters A to Z may occur anywhere.
- The source may not contain comments.
- Only complete stand-alone programs are accepted, not function solutions.
Example of an accepted program in standard C:
_Atomic int a=0x\
B\
C;
#define j int
extern char*
f=
"G"
"H";
#include <stdio.h>
j main (void){
k:;
long
m,
n,
o;
puts("ABCDEFGHIJKLMNOP"
"Q"
"R"
"S"
"T"
"U"
"V"
"W"
"X"
"Y"
"Z");}
Output
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1 comment thread