我是靠谱客的博主 自觉服饰,最近开发中收集的这篇文章主要介绍各种语言输出hello world,如C/java/perl/python/php/C++,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

C语言(C语言编译工具,如codeBlocks)

#include<stdio.h>
int main(){
     <strong>printf("hello world");</strong>
}

java(java编译工具:eclipse)

public class helloWorld {
	public static void main(String args[]){
		<strong>System.out.print("hello world");</strong>
	}
}

perl(可用perl编译工具,如Strawberry Perl

print"hello world";
编译过程: Windows下怎么运行Perl程序显示输出"hello,world"语句

python

print("hello world")

php

echo"hello world";

C++

#include <iostream>  
using namespace std;  
  
int main() {  
<h4>    cout << "hello world" << endl;   </h4>    return 0;  
}

javaScript

document.write("hello world");
alert("hello world");
JS控制台:console.log("hello world");
另外。。。

ruby

print("hello world")
p"hello world"
puts %Q.hello world
参考: ruby 16种 hello world 写法


最后

以上就是自觉服饰为你收集整理的各种语言输出hello world,如C/java/perl/python/php/C++的全部内容,希望文章能够帮你解决各种语言输出hello world,如C/java/perl/python/php/C++所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(85)

评论列表共有 0 条评论

立即
投稿
返回
顶部