Browse Source

Add 'B.cpp'

webturing 4 years ago
parent
commit
40450b89a8
1 changed files with 17 additions and 0 deletions
  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;
+}
+