当前位置:网站首页>参考代码系列_1.各种语言的Hello World
参考代码系列_1.各种语言的Hello World
2022-07-31 04:43:00 【joyyi9】
参考代码系列目录
前言
一、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 )
总结
哈哈哈,无聊而作
边栏推荐
- Can't load /home/Iot/.rnd into RNG
- SOLVED: After accidentally uninstalling pip (two ways to manually install pip)
- 扫雷游戏(c语言写)
- unity2d game
- Knowledge Distillation 7: Detailed Explanation of Knowledge Distillation Code
- [CV project debugging] CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT problem
- MySQL基础操作
- ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)解决办法
- Learning DAVID Database (1)
- input输入框展示两位小数之precision
猜你喜欢

MySQL数据库安装配置保姆级教程(以8.0.29为例)有手就行

Hand in hand to realize the picture preview plug-in (3)

【C语言进阶】文件操作(一)

No qualifying bean of type question

On Governance and Innovation | 2022 OpenAtom Global Open Source Summit OpenAnolis sub-forum was successfully held

ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your

开源汇智创未来 | 2022开放原子全球开源峰会OpenAtom openEuler分论坛圆满召开
![[Swift] Customize the shortcut that pops up by clicking the APP icon](/img/d4/84b237995fc3d3700916eb57f6670d.png)
[Swift] Customize the shortcut that pops up by clicking the APP icon

From scratch, a mirror to the end, a pure system builds a grasscutter (Grasscutter)

Industry-university-research application to build an open source talent ecosystem | 2022 Open Atom Global Open Source Summit Education Sub-Forum was successfully held
随机推荐
三道leetcode上的oj题
IDEA common shortcut keys and plug-ins
Port inspection steps - 7680 port analysis - Dosvc service
高等数学---第九章二重积分
Why don't you programmers make a living off your own projects?And have to work for someone else?
重磅 | 基金会为白金、黄金、白银捐赠人授牌
高斯分布及其极大似然估计
[AUTOSAR-RTE]-5-Explicit (explicit) and Implicit (implicit) Sender-Receiver communication
简易网络文件拷贝的C实现
扫雷小游戏——C语言
问题7:列表的拼接
MySQL数据库备份
ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that corresponds to your
BUG消灭者!!实用调试技巧超全整理
From scratch, a mirror to the end, a pure system builds a grasscutter (Grasscutter)
MySQL修改root账号密码
log level and print log note
MATLAB/Simulink & & STM32CubeMX tool chain completes model-based design development (MBD) (three)
慧通编程第4关 - 魔法学院第6课
【线性神经网络】softmax回归