Чтобы напечатать «привет, мир» на языке программирования Unison, вы можете использовать следующий код:
out "hello world"
Этот код выведет строку «hello world» на консоль в Unison.
Вот некоторые другие языки программирования и соответствующие им примеры кода для вывода «привет, мир»:
- Python:
print("hello world")
- Java:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("hello world");
}
}
- C++:
#include <iostream>
int main() {
std::cout << "hello world" << std::endl;
return 0;
}
- JavaScript:
console.log("hello world");
- Рубин:
puts "hello world"
- C#:
using System;
class HelloWorld {
static void Main() {
Console.WriteLine("hello world");
}
}
- Идем:
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
- Свифт:
import Swift
print("hello world")
- Ржавчина:
fn main() {
println!("hello world");
}
- Котлин:
fun main() {
println("hello world")
}