写一个helloworld程序
时间: 2023-09-09 15:12:11 浏览: 93
Python版:
```python
print("Hello, World!")
```
Java版:
```java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
```
C++版:
```c++
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
```
C版:
```c
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
```
JavaScript版:
```javascript
console.log("Hello, World!");
```
PHP版:
```php
<?php
echo "Hello, World!";
?>
```
Go版:
```go
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
```
Ruby版:
```ruby
puts "Hello, World!"
```
Swift版:
```swift
print("Hello, World!")
```
Kotlin版:
```kotlin
fun main() {
println("Hello, World!")
}
```
Rust版:
```rust
fn main() {
println!("Hello, World!");
}
```
阅读全文