2 solutions

  • 0
    @ 2024-7-8 11:05:37
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int n,k;
    	cin>>n;
            if(n==0)
            {
                cout<<0;
            }
    	while(n!=0)
        {
            k=n%10;
            cout<<k<<" ";
            n/=10;
        }
    	return 0;
    }
    
    • -1
      @ 2024-7-8 11:02:49

      #include<bits/stdc++.h> using namespace std; int main() { int n,k; cin>>n; if(n==0) { cout<<0; } while(n!=0) { k=n%10; cout<<k<<" "; n/=10; } return 0; }

      • 1

      Information

      ID
      43
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      1
      Tags
      (None)
      # Submissions
      209
      Accepted
      68
      Uploaded By