File tree 4 files changed +48
-1
lines changed
4 files changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ This ASCII representation is a cartoon mascot at [Cerner Engineering](http://eng
41
41
### Languages
42
42
* [ bash] ( https://www.gnu.org/software/bash/manual/ ) - [ art.sh] ( bash/art.sh ) (` bash art.sh ` )
43
43
* [ clojure] ( http://clojure.org/ ) - [ art.clj] ( clojure/art.clj ) (` java -cp clojure.jar clojure.main art.clj ` )
44
+ * [ c] ( http://en.wikipedia.org/wiki/C_(programming_language) ) - [ art.c] ( c/art.c ) (` gcc art.c -o art && ./art ` )
44
45
* [ coffeescript] ( http://coffeescript.org/ ) - [ art.coffee] ( coffeescript/art.coffee ) (` coffee art.coffee ` )
45
46
* [ d] ( http://dlang.org/ ) - [ art.d] ( d/art.d ) (` rdmd art.d ` )
46
47
* [ dart] ( https://www.dartlang.org/ ) - [ art.dart] ( dart/art.dart ) (` dart art.dart ` )
@@ -53,9 +54,11 @@ This ASCII representation is a cartoon mascot at [Cerner Engineering](http://eng
53
54
* [ julia] ( http://julialang.org/ ) - [ art.jl] ( julia/art.jl ) (` julia art.jl ` )
54
55
* [ lua] ( http://www.lua.org/ ) - [ art.lua] ( lua/art.lua ) (` lua art.lua ` )
55
56
* [ ocaml] ( https://ocaml.org ) - [ art.ml] ( ocaml/art.ml ) (` ocaml art.ml ` )
57
+ * [ ooc] ( http://ooc-lang.org/ ) - [ art.ooc] ( ooc/art.ooc ) (` rock art.ooc && ./art ` )
56
58
* [ node.js] ( http://nodejs.org/ ) - [ art.js] ( node/art.js ) (` node art.js ` )
57
59
* [ python] ( https://docs.python.org/3/ ) - [ art.py] ( python/art.py ) (` python art.py ` )
58
60
* [ r] ( http://www.r-project.org/ ) - [ art.r] ( r/art.r ) (` Rscript art.r ` )
59
61
* [ rebol] ( http://www.rebol.com/ ) - [ art.r] ( rebol/art.r ) (` rebol art.r ` )
60
62
* [ ruby] ( https://www.ruby-lang.org/en/ ) - [ art.rb] ( ruby/art.rb ) (` ruby art.rb ` )
61
- * [ rust] ( http://www.rust-lang.org/ ) - [ art.rs] ( rust/art.rs ) (` rustc art.rs && ./art ` )
63
+ * [ rust] ( http://www.rust-lang.org/ ) - [ art.rs] ( rust/art.rs ) (` rustc art.rs && ./art ` )
64
+ * [ scala] ( http://www.scala-lang.org/ ) - [ Art.scala] ( scala/Art.scala ) (` scalac Art.scala && scala Art ` )
Original file line number Diff line number Diff line change
1
+ #include <stdio.h>
2
+
3
+ // "2 to the 5th" programming competition @ engineering.cerner.com
4
+ //
5
+ // Read in the ASCII art file and simply print it to the console.
6
+ // Note: This assumes you are executing "gcc art.c -o art && ./art"
7
+ // in the current working directory.
8
+ //
9
+ // Reference: http://stackoverflow.com/questions/14062910/clearest-way-to-read-and-print-txt-file-lines-in-c
10
+ //
11
+ int main (int argc , char * * argv )
12
+ {
13
+ FILE * filePtr ;
14
+ const char * fileName = "../art/alan.txt" ;
15
+ if ((filePtr = fopen (fileName , "r" )) != 0 ) {
16
+ char * buffer = 0 ;
17
+ size_t bufferLength = 0 ;
18
+ while (getline (& buffer , & bufferLength , filePtr ) != -1 )
19
+ fputs (buffer , stdout );
20
+
21
+ // Clean up
22
+ fclose (filePtr );
23
+ }
24
+ return (0 );
25
+ }
Original file line number Diff line number Diff line change
1
+ import io/File
2
+
3
+ // "2 to the 5th" programming competition @ engineering.cerner.com
4
+ //
5
+ // Read in the ASCII art file and simply print it to the console.
6
+ // Note: This assumes you are executing "rock art.ooc && ./art"
7
+ // in the current working directory.
8
+ println (File new ("../art/alan.txt" ) read ())
Original file line number Diff line number Diff line change
1
+ import scala .io .Source
2
+
3
+ // "2 to the 5th" programming competition @ engineering.cerner.com
4
+ //
5
+ // Read in the ASCII art file and simply print it to the console.
6
+ // Note: This assumes you are executing "scalac Art.scala && scala Art"
7
+ // in the current working directory.
8
+ object Art extends App {
9
+ for (line <- Source .fromFile(" ../art/alan.txt" ).getLines())
10
+ println(line)
11
+ }
You can’t perform that action at this time.
0 commit comments