더북(TheBook)

1.1 | 첫 번째 프로그램

 

다음 예제를 살펴보면서 C++ 언어에 대한 소개를 시작해 본다.

#include <iostream>

int main()
{
    std::cout << "The answer to the Ultimate Question of Life, \n"
                    << "the Universe, and Everything is: "
                    << std::endl << 6 * 7 << std::endl;

    return 0;
}

이 프로그램의 결과는 다음과 같다.

The answer to the Ultimate Question of Life,

the Universe, and Everything is:

42

신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.