일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- unreal engine4
- 연결리스트
- std
- 파이썬
- codecademy
- endl
- Java
- python
- if
- cow
- CSS
- bool
- 파이선
- 코딩도장
- 알고리즘
- html
- Polymorphism
- Bull
- Notting hill
- Unreal
- html5
- for
- Euler
- dictation
- cout
- UE4
- Project
- C++
- 영알남
- font weight
Archives
- Today
- Total
피보나치 본문
import java.sql.SQLOutput;
import java.util.*;
public class Example {
public static void main(String[] args) {
Example ex = new Example();
int k = ex.fac(8);
}
int fac(int n) {
int a=1;
int result=1;
while (a <= n) {
result*=a;
System.out.printf("%d! = %20d",a,result);
System.out.println();
a++;
}
return result;
}
}
재귀 안씀
'Programming > Java' 카테고리의 다른 글
다형성 예제3 (Vector 추가) (0) | 2018.01.19 |
---|---|
다형성 예제 2 (객체 배열 추가) (0) | 2018.01.19 |
polymorphism (다형성) Example (0) | 2018.01.19 |
단축키 (0) | 2018.01.13 |
Java의 정석 공부 (0) | 2018.01.13 |
Comments