程序員會(huì)怎樣寫(xiě)自己的墓志銘?
謝邀!
下面分享15種程序猿的“墓志銘”:
01、java:
public class HelloWorld
{
public static void main(String[] args)
{
System.out.println(“Bye World!”);
}
}
02、C:
#include <stdio.h>
int main()
{
printf(“Bye World”);
return 0;
}
03、C++:
#include <stdafx.h>
#include <iostream>
using namespace std;
int main()
{
cout<<“Bye World”<<endl;
return 0;
}
04、C#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(“Bye World!”);
Console.ReadLine();
}
}
}
05、VB:
Module MainFrm
Sub Main()
System.Console.WriteLine(“Hello, World!”)
End Sub
End Module
06、Swift::
print(“Hello, World!”)
07、Go:
package main
import “fmt”
func main() {
fmt.Print(“Hello, World!”)
}
08、BATCH:
@echo off
echo Hello, World!
pause
09、PHP:
echo “Hello, World!”;
10、Java
console.log(“Hello, World!”)
11、LaTeX:
\documentclass{article}
\begin{document}
Hello, World!
\end{document}
12、Mathematica:
方法一:基于Wolfram 底層語(yǔ)言(進(jìn)入表達(dá)式界面使用)
Cell[“Hello, World!”]
方法二:直接使用數(shù)學(xué)輸出函數(shù)
CellPrint[Cell[“Hello, World!”]]
13、Python:
print(“Hello, World!”)
14、Pascal:
begin
writeln(“Bye World”);
end.
15、html:
<html>
<body>
<p>
Bye World!
</p>
</body>
</html>