소스 검색

Add 'B.cpp'

webturing 4 년 전
부모
커밋
40450b89a8
1개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 17 0
      B.cpp

+ 17 - 0
B.cpp

@@ -0,0 +1,17 @@
+#include<bits/stdc++.h>
+using namespace std;
+void Print(int n) {
+    if (n < 10) {
+        cout << n << " ";
+        return ;
+    }
+    Print(n / 10);
+    cout << n % 10 << " ";
+}
+int main() {
+    int n;
+    cin >> n;
+    Print(n);
+    return 0;
+}
+