일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- xss game
- blind sql injection
- 파이썬
- jQuery
- xss game 풀이
- lord of sql injection
- element 조회
- object
- property
- document
- 배열
- Pwndbg
- burp suite
- IF문
- sql injection
- 메소드
- 함수
- suninatas 풀이
- python
- 백준 파이썬
- 조건문
- window
- 객체
- 김성엽 대표님
- 자바스크립트
- htmlspecialchars
- 사칙연산
- 포인터
- github
- 백준 알고리즘
Archives
- Today
- Total
power-girl0-0
[ C++ ] 피보나치수열 본문
728x90
소스코드
#include <iostream>
#include <queue>
#include <algorithm>
using namespace std;
int main(){
queue <int> q;
int num;
q.push(0); q.push(1);
cout<<endl;
cout<<q.front()<<" ";
for(int i=0; i<20; i++){
num = q.front() + q.back();
cout<<q.back()<<" ";
q.pop();
q.push(num);
}
cout<<endl;
}
결과
728x90
'언어 > C++' 카테고리의 다른 글
[ C++ ] vector을 활용한 예제 (0) | 2021.06.01 |
---|---|
[ C++ ] 함수 중복 (0) | 2021.05.04 |
[ C++ ] 헹맨 게임 (0) | 2021.04.13 |
[ C++ ] find를 활용하여, 문자 찾기 (0) | 2021.04.13 |
[ C++ ] 동적할당을 이용하여 원의 면적과 둘레 구하기 (0) | 2021.04.06 |
Comments