当前位置:网站首页>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
边栏推荐
- CentOS7 —— yum安装mysql
- STM32HAL library modifies Hal_Delay to us-level delay
- ERROR 2003 (HY000) Can't connect to MySQL server on 'localhost3306' (10061)Solution
- Puzzle Game Level Design: Reverse Method--Explaining Puzzle Game Level Design
- DVWA靶场环境搭建
- Simple read operation of EasyExcel
- XSS靶场(三)prompt to win
- Unity打灵狐者
- 【py脚本】批量二值化处理图像
- The input input box displays the precision of two decimal places
猜你喜欢
Explanation of
[Linear Neural Network] softmax regression
Unity Fighter
MySQL忘记密码怎么办
MySQL optimization slow log query
Musk talks to the "virtual version" of Musk, how far is the brain-computer interaction technology from us
The MySQL database installed configuration nanny level tutorial for 8.0.29 (for example) have hands
Multiple table query of sql statement
Unity框架设计系列:Unity 如何设计网络框架
Doris学习笔记之监控
随机推荐
MySQL transaction (transaction) (this is enough..)
Unity Tutorial: URP Rendering Pipeline Practical Tutorial Series [1]
MySQL常见面试题汇总(建议收藏!!!)
开源社区三十年 | 2022开放原子全球开源峰会开源社区三十年专题活动圆满召开
论治理与创新 | 2022开放原子全球开源峰会OpenAnolis分论坛圆满召开
ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your
Error EPERM operation not permitted, mkdir 'Dsoftwarenodejsnode_cache_cacach Two solutions
Visual studio shortcuts that improve efficiency, summary (updated from time to time)
ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)解决办法
MySQL数据库增删改查(基础操作命令详解)
Go language study notes - dealing with timeout problems - Context usage | Go language from scratch
Solved (the latest version of selenium framework element positioning error) NameError: name 'By' is not defined
Lua,ILRuntime, HybridCLR(wolong)/huatuo热更新对比分析
[C language] Detailed explanation of operators
12个MySQL慢查询的原因分析
【线性神经网络】softmax回归
sql statement - how to query data in another table based on the data in one table
MySQL database backup
Industry landing presents new progress | 2022 OpenAtom Global Open Source Summit OpenAtom OpenHarmony sub-forum was successfully held