用多种编程语言写hello world

2025-10-27 08:55:42

1、C语言:

#include <stdio.h>

int main()

{

   printf("Hello, World! \n");

   

   return 0;

}

用多种编程语言写hello world

2、html:

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>hello world</title>

</head>

<body>

<h1>HELLO WORLD</h1>

</body>

</html>

用多种编程语言写hello world

3、JS:

<!DOCTYPE html>

<html>

<head> 

<meta charset="utf-8"> 

<title>hello world</title> 

</head>

<body>

<p id="demo">

<script>

document.getElementById("demo").innerHTML="HELLO WORLD";

</script>

</body>

</html>

用多种编程语言写hello world

4、PHP:

<!DOCTYPE html> 

<html> 

<body> 

<?php 

echo "Hello World!"; 

?> 

</body> 

</html>

用多种编程语言写hello world

5、C++:

#include <iostream>

using namespace std;

int main()

{

    cout << "Hello, world!" << endl;

    return 0;

}

用多种编程语言写hello world

6、PYTHON:

#!/usr/bin/python

print("Hello, World!")

用多种编程语言写hello world

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢