U E D R , A S I H C RSS

반복문자열/조현태

C++

느낀점



코드


//CAUCSE 5번 출력하기.
#include <iostream>

using namespace std;

void print_CAUCSE_LOVE(void);

void main(){
	for (register int i=0; i<5; ++i)
		print_CAUCSE_LOVE();
	system ("PAUSE");
}

void print_CAUCSE_LOVE(){
	cout << "CAUCSE_LOVE\n";
}

Erlang

느낀점

1시간 걸렸다 -_ - 캐어렵..

코드

  • pr_1.erl

-module(pr_1).
-export([repeat/3]).
repeat(Max, Max, L) -> [L];
repeat(I, Max, L) -> [L | repeat(I + 1, Max, L)].

  • shell

10> c(pr_1).
{ok,pr_1}
11> pr_1:repeat(1, 3, "CAUCSE LOVE").
["CAUCSE LOVE","CAUCSE LOVE","CAUCSE LOVE"]
12> 

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:35
Processing time 0.0066 sec