Hello, world!

Gaon12 (토론 / 기여)님의 2021년 5월 17일 (월) 22:59 판 (시작)
(차이) ← 이전 판 / 최신판 (차이) / 다음 판 → (차이)
#include <stdio.h>

int main()
{
	printf("Hello, world!");

	return 0;
}
#include <stdio.h>

int main()
{
	printf("안녕 세상아!");

	return 0;
}

컴퓨터 언어들에서 가장 기본으로 배우는 내용인 Hello, world!에 대해 다룬다. 거의 모든 프로그래밍 책들은 국룰로 처음에 Hello, world!로 시작하며, 이는 데니스 리치가 쓴 책인 "The C Programming Language" 교재의 첫 번째 예제가 화면이 "Hello, world!"를 출력하는 것이었기 때문이었다.


각 언어로 표현한 Hello, world!

C

#include <stdio.h>

int main()
{
	printf("Hello, world!");

	return 0;
}

C++

#include <iostream>

int main(int argc, char* argv[]) {
    std::cout << "Hello World!" << std::endl;

    return 0;
}

JavaScript

document.write("Hello, world!")

Python

print('Hello, world!')

PHP

<?php
echo "Hello, world";
?>

분기

이 문서는 가온 위키도움말:위키 문법/SyntaxHighlight 문서 85572판에서 분기하였습니다.
• 현재 페이지 URL 줄이기