파이썬 포문 증감 (1) 썸네일형 리스트형 백준 알고리즘 단계별 문제풀이 3 . for문 , 기찍 N (백준 2742번) 백준 알고리즘 문제의 단계별 문제의 5번. for문 파트입니다. C언어입니다. #include int main(){ int n; scanf("%d",&n); for (int i=n;i>=1;i--){ printf("%d\n",i); } } C++입니다. C++ 은 ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); 3가지 구문을 추가해줍니다. 또 endl 대신 "\n"으로 처리해줍니다. #include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin>>n; for (int i=n;i>=1;i--){ cout 이전 1 다음