为了给1024献礼,我做出了用35种编程语言输出的1024。希望大家喜欢。
话不多说,直接上代码:
C Programming Language:
printf("1024\n");
C++:
cout << "1024\n";
Python:
(Python 2)
print "1024"
(Python 3)
print("1024")
Golang:
fmt.Print("1024")
Java:
System.out.println("1024");
C#:
Console.WriteLine(“1024”);
Swift:
print("1024")
PHP:
JavaScript:
var sys = require("sys");
sys.puts("1024")
Ruby:
(Print)
print "1024\n"
(Puts)
puts "1024\n"
R Programming Language:
cat('1024')
SQL:
SQL> select '1024' from dual;
Perl:
print "1024\n";
(or)
print("1024")
Visual Basic .NET:
Module Day
Sub Main()
Console.WriteLine("1024")
End Sub
End Module
Scala:
println("1024")
Shell:
(echo) (Windows, macOS, Linux)
echo "1024"
(printf) (macOS, Linux)
printf "1024"
Fortran:
program day
print *, "1024"
end program day
TCL:
puts "1024"
Visual FoxPro:
?"1024"
Pascal:
Program Day(output);
begin
writeln('1024')
Prolog:
write("1024").
BASIC Programming Language:
PRINT "1024"
Clipper:
? "1024"
Delphi:
program Day;
begin
Writeln('1024');
end.
CoffeeScript:
console.log '1024'
MatLab:
disp('1024')
Julia:
println("1024")
HTML:
1024
Logo Programming Language:
print [1024]
jQuery:
$("body").append("1024");
Objective-C:
NSLog(@"1024")
VBScript:
MsgBox "1024"
XSLT:
1024
Processing:
void setup(){
println("1024");
}
AppleScript:
say "1024" using "Fred"
了解更多知识和教程,请关注CSDN用户 @钜铠。如果喜欢这篇文章的话,请不吝惜你的一个赞吧!谢谢!