challenge Hello, world!

「Hello, world!」と表示するプログラムを作ってください。

Posted feedbacks - C++

C++で書いてみました。mainには何も書かない方向で。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#include <iostream>

class hello
{
public:
    hello(){
        std::cout << "hello world" << std::endl;
    }
} world;


int main()
{
    return 0;
}

C++始めました。ど素人ですが、ちょこちょこ投稿するつもりです。とりあえず、g++を使用しました。
1
2
3
4
5
6
7
#include <iostream>

int main()
{
	std::cout << "Hello, world!" << std::endl;
	return 0;
}

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#include <iostream>

using namespace std;

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

Index

Feed

Other

Link

Pathtraq

loading...