美文网首页
Hello World

Hello World

作者: Dayon | 来源:发表于2019-10-16 17:00 被阅读0次

    C

    #include <stdio.h>
    
    int main(int argc, const char * argv[]) {
        printf("Hello, World!\n");
        return 0;
    }
    

    Objective-C

    #import <Foundation/Foundation.h>
    
    int main(int argc, const char * argv[]) {
        @autoreleasepool {
            NSLog(@"Hello, World!");
        }
        return 0;
    }
    

    Swift

    import Foundation
    
    print("Hello, World!")
    

    Java

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

    JavaScript

    #!/usr/local/bin/node
    
    var http = require( "http" );
    http.createServer( function ( request, response ) {
      response.writeHeader( 200, {
        "Content-Type": "text/html"
      } );
      response.write( "Hello World!" );
      response.end();
    } ).listen( 8080 ); // Activates this server, listening on port 8080.
    

    ASP

    <%response.write "Hello World!"%>
    

    PHP

    <?php echo '<p>Hello World!</p>'; ?>
    

    Keep Learning …

    相关文章

      网友评论

          本文标题:Hello World

          本文链接:https://www.haomeiwen.com/subject/uyuumctx.html