你好,世界!

406次阅读
没有评论

你好,世界!

PHP

<?php
echo 'Hello World.';
?>

Java

package com.example;

public class Main {public static void main(String[] args) {System.out.println("Hello World.");
    }
}

Python

print("Hello World.")

Vue

<template>
  <div id="app">
    <h1>{{msg}}</h1>
  </div>
</template>

<script>
export default {name: 'HelloWorld',
  data () {return {msg: 'Welcome to Your Vue.js App'
    }
  }
}
</script>

Javascript

console.log("Hello World.");

HTML

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Hello World.</title>
</head>
<body>
  <h1>Hello World.</h1>
</body>
</html>

C

#include <stdio.h>

int main() {printf("Hello World.");
    return 0;
}

C++

#include <iostream>

int main() {std::cout << "Hello World." << std::endl;
    return 0;
}

Go

package main

import "fmt"

func main() {fmt.Println("Hello World.")
}

Rust

fn main() {println!("Hello World.");
}

Ruby

puts "Hello World."

Swift

print("Hello World.")

bash

echo "Hello World."

PowerShell

Write-Host "Hello World."

Kotlin

fun main() {println("Hello World.")
}

Dart

void main() {
print("Hello World.");
}


正文完
 1
DRMCC
版权声明:本站原创文章,由 DRMCC 于2024-12-30发表,共计965字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)