[ create a new paste ] login | about

Link: http://codepad.org/PHYJQF5v    [ raw code | output | fork ]

C, pasted on Jul 3:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Fancy Credits
# Demonstrates escape sequences

# MUST be part of a string!
# \ followed by a special character

print("\t\t\tFancy Credits") # \t - tab key

print("\t\t\t \\ \\ \\ \\ \\ \\ \\")# \\ - print '\'
print("\t\t\t\tby")
print("\t\t\t  Lily Ma")
print("\t\t\t \\ \\ \\ \\ \\ \\ \\")

print("Special thanks goes out to:")
print("My hair stylist, Henry \'The Great,\' who never says \n\"can't.\"")

# sound the system bell
print("\a")

input("\n\nPress the enter key to exit.")


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Line 2: error: invalid preprocessing directive #Fancy
Line 2: error: invalid preprocessing directive #Demonstrates
Line 2: error: invalid preprocessing directive #MUST
Line 2: error: invalid preprocessing directive #\
Line 7: error: expected declaration specifiers or '...' before string constant
Line 7: error: stray '#' in program
Line 7: error: stray '\' in program
In function 'print':
Line 7: error: expected declaration specifiers before 't'
Line 9: error: stray '#' in program
Line 9: error: stray '\' in program
Line 9: error: stray '\' in program
Line 9: error: missing terminating ' character
Line 2: error: invalid preprocessing directive #sound


Create a new paste based on this one


Comments: