不同编程语言实现HelloWorld程序

C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HelloWorld
{
      class Program
      {
            static void Main(string[] args)
            {
                  Console.WriteLine("Hello World!");
                  Console.ReadLine();
            }
      }
}

C++

#include <iostream>

int main()
{
      std::cout << "Hello World!" << std::endl;
      std::cin.get();
      return 0;
}

C语言

#include <stdio.h>

int main()
{
      printf("Hello World!");
      system("pause");
      return 0;
}

java

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

python

print "Hello World!"

猜你喜欢

转载自www.cnblogs.com/fenggwsx/p/13192446.html
今日推荐