-
Notifications
You must be signed in to change notification settings - Fork 0
irxground edited this page Sep 10, 2013
·
5 revisions
各言語における標準出力関数の比較
#include <stdio.h>
int main(int argc, char** argv) {
printf("hello, world\n");
}
#include <iostream>
int main() {
std::cout << "Hello World!" << std::endl;
}
public class Sample {
public static void main(String[] args) {
System.out.print("Hello, ");
System.out.println("world");
}
}
using System;
public class Sample {
public static void Main(string[] args) {
Console.Write("Hello, ");
Console.WriteLine("world");
}
}
printf "Hello, "
printfn "world!"
print 'Hello, '
puts 'world!'
<?php
echo "Hello, world".PHP_EOL
print "Hello, world", "\n"
use 5.10.0
say "Hello, world"
main :: IO ()
main = do
putStr "Hello, "
putStrLn "world"
echo Hello, world
(begin
(display "Hello, world")
(newline))