二十種編程語言齊送鼠年祝福

在這新春佳節到來之際,小李在此給你們送上最誠摯的祝福,祝你們都有php

file

Python

print("Happy Year of the Rat !")

Java

public class HappyNewYear {
    public static void main(String[] args) {
        System.out.println("Happy Year of the Rat !");
    }
}

C

#include <stdio.h>
int main()
{
    printf("Happy Year of the Rat !");
    return 0;
}

C++

#include <iostream>
using namespace std;
int main()
{
    cout << "Happy Year of the Rat !" << endl;
    return 0;
}

C

using System;
namespace HappyNewYearApplication
{
    class HappyNewYear
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Happy Year of the Rat !");
            Console.ReadKey();
        }
    }
}

Object-C

NSLog(@"Happy Year of the Rat !")

Node.js

console.log("Happy Year of the Rat !");

PHP

<?php
echo "Happy Year of the Rat !";
?>

VBScript

<script type="text/vbscript">
document.write("Happy Year of the Rat !")
</script>

Delphi

showMessage('Happy Year of the Rat !')

Lua

print "Happy Year of the Rat !"

Matlab

disp('Happy Year of the Rat !')

Ruby

puts "Happy Year of the Rat !"

Android

Toast.makeText(getApplicationContext(), "Happy Year of the Rat !",Toast.LENGTH_SHORT).show()

Perl

print 'Happy Year of the Rat !'

R

cat("Happy Year of the Rat !")

HTML

<body><h1>Happy Year of the Rat !<h1></body>

ASP

response.write("Happy Year of the Rat !")

ActionScript

Alert.show("Happy Year of the Rat !")

Go

package main
import (
    "fmt"
)
func main() {
    a :="Happy Year of the Rat !"
    fmt.Printf("%s",a)
}
相關文章
相關標籤/搜索