U E D R , A S I H C RSS

구구단/문원명

No older revisions available

No older revisions available



데블스 캠프 첫번째 (c++)

~cpp 

#include <iostream>
using namespace std;

void main()
{
	cout<<"\t구구단\n";
	for(int i=1;i<=9;i++)
	{
		for(int j=2;j<=5;j++)
		{
			cout<<j<<" * "<<i<<" = "<<i*j<<"\t";
		}
		cout<<endl;
	}
	cout<<endl<<endl;
	for(int k=1;k<=9;k++)
	{
		for(int m=6;m<=9;m++)
			cout<<m<<" * "<<k<<" = "<<k*m<<"\t";
		cout<<endl;
	}

}


셋째날 (scheme)

~cpp 
(define (mul x y) (begin (print x) (print  * )(print y)(print  = ) (print (* x y))(newline)))
(define (num a b) 
  (if (<= b 9)(begin (mul a b)(num a (+ b 1)))
      (when (< a 9)        
            (begin (num (+ a 1) 1)))))

(num 2 1)


셋째날 (Squeak)

~cpp 
GGD
 | n c |
 n := 2.
 c := 1.
 
 8 timesRepeat:[[9 timesRepeat: [Transcript show:n*c.Transcript cr.c:=c+1.]].c := 1.n := n +1.].
 




DeleteMe 도움말페이지이름을 보시고, 현재 페이지를 접근하기 쉽고, 유용하게 해주세요. 하단은 역링크랍니다.

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:28:44
Processing time 0.0282 sec