当前位置:网站首页>Reference code series_1. Hello World in various languages
Reference code series_1. Hello World in various languages
2022-07-31 04:56:00 【joyyi9】
Refer to the Code Series Catalog
各种语言的Hello World
前言
一、Js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello World</title>
<script>
function displayDate({
document.getElementById("demo").innerHTML=Date();}
</script>
</head>
<body>
<h1>Hello World</h1>
<p id="demo">xxx</p>
<button type="button" onclick="displayDate()">显示日期</button>
</body>
</html>
二、Python
print("Hello, World!")
三、Java
public class HelloWorld {
public static void main(String []args) {
System.out.println("Hello World");
}
}
四、C
#include <stdio.h>
int main()
{
/* 我的第一个 C 程序 */
printf("Hello, World! \n");
return 0;
}
五、C++
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, world!" << endl;
cout << "Hello, world!" << "\n";
return 0;
}
六、Ruby
puts "Hello World!";
七、Scala
object HelloWorld {
def main(args: Array[String]): Unit = {
println("Hello, world!")
}
}
八、Go
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
九、C#
using System;
namespace HelloWorldApplication
{
/* 类名为 HelloWorld */
class HelloWorld
{
/* main函数 */
static void Main(string[] args)
{
/* 我的第一个 C# 程序 */
Console.WriteLine("Hello World!");
Console.ReadKey();
}
}
}
十、R
myString <- "Hello, World!"
print ( myString )
总结
哈哈哈,bored
边栏推荐
- mysql uses on duplicate key update to update data in batches
- MySQL optimization: from ten seconds to three hundred milliseconds
- MySQL数据库必会的增删查改操作(CRUD)
- MySQL忘记密码怎么办
- sql语句-如何以一个表中的数据为条件据查询另一个表中的数据
- Industry-university-research application to build an open source talent ecosystem | 2022 Open Atom Global Open Source Summit Education Sub-Forum was successfully held
- The input input box displays the precision of two decimal places
- Error EPERM operation not permitted, mkdir 'Dsoftwarenodejsnode_cache_cacach Two solutions
- MySQL优化之慢日志查询
- Three oj questions on leetcode
猜你喜欢

MySQL优化之慢日志查询
![[R language] [3] apply, tapply, lapply, sapply, mapply and par function related parameters](/img/98/282d8d192f701ad33de48aeeb038b4.png)
[R language] [3] apply, tapply, lapply, sapply, mapply and par function related parameters

HCIP第十天_BGP路由汇总实验

centos7安装mysql5.7

Unity教程:URP渲染管线实战教程系列【1】

DVWA安装教程(懂你的不懂·详细)

Explanation of

产学研用 共建开源人才生态 | 2022开放原子全球开源峰会教育分论坛圆满召开

DVWA installation tutorial (understand what you don't understand · in detail)

ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
随机推荐
The input input box displays the precision of two decimal places
MySQL database addition, deletion, modification and query (detailed explanation of basic operation commands)
Unity教程:URP渲染管线实战教程系列【1】
centos7安装mysql5.7
Error EPERM operation not permitted, mkdir 'Dsoftwarenodejsnode_cache_cacach Two solutions
【wpf】wpf中的那些模板之深度解析
Lua,ILRuntime, HybridCLR(wolong)/huatuo hot update comparative analysis
CentOS7 install MySQL graphic detailed tutorial
MySQL数据库必会的增删查改操作(CRUD)
Puzzle Game Level Design: Reverse Method--Explaining Puzzle Game Level Design
【debug锦集】Expected input batch_size (1) to match target batch_size (0)
Heavyweight | The Open Atomic School Source Line activity was officially launched
EasyExcel的简单读取操作
From scratch, a mirror to the end, a pure system builds a grasscutter (Grasscutter)
Centos7 install mysql5.7 steps (graphical version)
input输入框展示两位小数之precision
【云原生】DevOps(五):集成Harbor
MySQL optimization slow log query
MySQL forgot password
Mysql application cannot find my.ini file after installation