Updated by Shatrughn Gupta 2018-10-16 View revision File hello-kotlin.kt Added Side-by-side diff More Ignore whitespace Hide word diff +/* + This program won't run properly without an input. + Try with: abc +*/ +fun main(args: Array<String>) { + println("Hello World from Kotlin!") + println(readLine()!!) +} File hello-node.js Added Side-by-side diff More Ignore whitespace Hide word diff +console.log('Hello World from Nodejs!') +console.log(require('fs').readFileSync(0).toString()) File hello-ruby.rb Added Side-by-side diff More Ignore whitespace Hide word diff +puts "Hello World from Ruby!" +puts $stdin.read File hello.c Added Side-by-side diff More Ignore whitespace Hide word diff +#include <stdio.h> +#include <stdlib.h> + +int main(int argc, char* argv[]) +{ + puts("Hello World from C!"); + char *buffer = NULL; + long unsigned int len; + getline(&buffer, &len, stdin); + printf("%s", buffer); + free(buffer); + return 0; +} File hello.cpp Added Side-by-side diff More Ignore whitespace Hide word diff +#include <iostream> +using namespace std; + +int main(int argc, char **argv) +{ + cout << "Hello World from C++!\n"; + string mystr; + getline(cin, mystr); + cout << mystr << "\n"; + return 0; +} File hello.go Added Side-by-side diff More Ignore whitespace Hide word diff +package main + +import "os" +import "fmt" +import "bufio" + +func main() { + fmt.Println("Hello World from Go!") + reader := bufio.NewReader(os.Stdin) + text, _ := reader.ReadString('\n') + fmt.Print(text) +} File hello.java Added Side-by-side diff More Ignore whitespace Hide word diff +/* + This program won't run properly without an input. + Try with: abc +*/ +import java.util.Scanner; + +class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello World from Java!"); + Scanner scan = new Scanner(System.in); + System.out.println(scan.nextLine()); + } +} File hello.php Added Side-by-side diff More Ignore whitespace Hide word diff +<?php + echo "Hello World from PHP!\n"; + echo stream_get_contents(STDIN); +?> File hello.py Added Side-by-side diff More Ignore whitespace Hide word diff +import sys + +print('Hello World from Python!') +for line in sys.stdin: + print line.rstrip() File hello.py3 Added Side-by-side diff More Ignore whitespace Hide word diff +import sys + +print('Hello World from Python 3!') +for line in sys.stdin: + print(line.rstrip()) File hello.scala Added Side-by-side diff More Ignore whitespace Hide word diff +/* + This program won't run properly without an input. + Try with: abc +*/ +object HelloWorld { + def main(args: Array[String]): Unit = { + println("Hello World from Scala!") + println(scala.io.StdIn.readLine()) + } +} File test.py Deleted More Ignore whitespace Hide word diff -print "Hi there from Python!" File test.py3 Deleted More Ignore whitespace Hide word diff -print("Hi there from Python3!") File test.txt Deleted More Ignore whitespace Hide word diff -console.log('Hello World from JavaScript!') File test3.js Deleted More Ignore whitespace Hide word diff -console.log('Hello World from JavaScript!')
Updated by Shatrughn Gupta 2018-10-01 View revision File test.py Modified Side-by-side diff More Ignore whitespace Hide word diff -print("Hi there from Python3!") +print "Hi there from Python!" File test.py3 Added Side-by-side diff More Ignore whitespace Hide word diff +print("Hi there from Python3!") File test.txt Added Side-by-side diff More Ignore whitespace Hide word diff +console.log('Hello World from JavaScript!') File test2.txt Deleted More Ignore whitespace Hide word diff -console.log('Hello World from JavaScript!')
Updated by Shatrughn Gupta 2017-07-11 View revision File snippet.txt Deleted More Ignore whitespace Hide word diff -console.log('Hello World from JavaScript without filename!') File test.py Added Side-by-side diff More Ignore whitespace Hide word diff +print("Hi there from Python3!") File test.py3 Deleted More Ignore whitespace Hide word diff -print("Hello World from Python3!") - -print("Hello World from Python3!") File test2.js Deleted More Ignore whitespace Hide word diff -console.log('Hello World from JavaScript!') File test2.txt Added Side-by-side diff More Ignore whitespace Hide word diff +console.log('Hello World from JavaScript!') File test3.js Added Side-by-side diff More Ignore whitespace Hide word diff +console.log('Hello World from JavaScript!')
Updated by Shatrughn Gupta 2017-06-29 View revision File test.py3 Modified Side-by-side diff More Ignore whitespace Hide word diff print("Hello World from Python3!") + +print("Hello World from Python3!")
Updated by Shatrughn Gupta 2017-06-29 View revision File test.py3 Modified Side-by-side diff More Ignore whitespace Hide word diff -print("Hello World from Python3!") +print("Hello World from Python3!")