新年到新年祝福代码,喜庆欢乐围绕。
@程序员小助手 用 24 种编程语言新年祝福代码,
祝福大家 “新年快乐”,“大吉大利”!
1 - C #include <stdio.h> int main() { printf("Happy new year!"); return 1; } 2 - Java public class HappyNewYear { public static void main(String[] args) { System.out.println("Happy new year!"); } } 3 - C++ #include <iostream> #include <stdio.h> int main() { printf("Happy new year!\n"); puts("Happy new year!"); std::cout << "Happy new year!" << std::endl; return 1; } 4 - Python# Python 2print 'Happy new year!'# Python 3print('Happy new year!')5 - C#using System; class HappyNewYearApp { public static void Main() { Console.WriteLine("Happy new year!"); Console.ReadKey(); } }6 - PHPecho 'Happy new year!';print('Happy new year!')print_r('Happy new year!');var_dump('Happy new year');;7 - JavaScript# 浏览器console.log('Happy new year!')# node.jsvar sys = require("sys")sys.puts("Happy new year!")8 - Rubyprint "Happy new year!\n"puts "Happy new year!\n"9 - Rprint("Happy new year!")10 - SQL-- 创建表CREATE TABLE INFO (TEXT VARCHAR(50)); -- 插入数据 INSERT INTO INFO (TEXT) VALUES ('Happy new year!'); -- 查询值 SELECT TEXT FROM INFO; -- 删除表DROP TABLE INFO; 11 - Perlprint "happy new year!";12 - VBModule HappyNewYear Sub Main() MsgBox("Happy new year!") End Sub End Module 13 - Scalaobject HappyNewYear { def main(args:Array[String]) { println("Happy new year!"); } } 14 - Shell [Bash]echo "Happy new year!"15 - Fortranprogram happy_new_yearprint *,"Happy new year!" end program happy_new_year16 - TCLputs "Happy new year!"17 - AWKawk 'BEGIN {print "Happy new year!"}' 18 - Swiftprintln("Happy new year!")19 - PascalProgram HelloWorld(output); begin writeln('Happy new year!') end.20 - Adawith TEXT_IO;procedure HelloNewYear isbegin TEXT_IO.PUT_LINE ("Happy new year!");end HelloNewYear;21 - Gopackage mainimport "fmt"func main() { fmt.Println("Happy new year!")}22 - COBOLIDENTIFICATION DIVISION.PROGRAM-ID. 'HAPPYNEWYEAR'.ENVIRONMENT DIVISION.DATA DIVISION.FILE SECTION.WORKING-STORAGE SECTION.PROCEDURE DIVISION.MAIN-PROCEDURE. DISPLAY "Happy new year!" STOP RUN.23 - MATLABfunction HappyNewYear() disp('Happy new year!');end24 - HTML<!DOCTYPE html> <html> <body> <p>Happy new year!</p> </body> </html>写在最后【HTML】:“位居 24 强之列,我名副其实”。
其他语言一脸无法描述之状态。
MARKDOWN 墙裂表示不服!
希望广大的读者,在新年喜悦之余,
能够看到自己夜以继日相伴的编程语言
为自己送上 “Happy new year”,
应心甚宽慰。
我是 @程序员小助手,持续分享编程与程序员成长相关的内容,欢迎关注~~