4 solutions

  • 1
    @ 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;
    }
    
    • 0
      @ 2026-8-25 20:25:06
      #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;
      }
      • 0
        @ 2026-8-20 20:31:30
        #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;
        }
        • -2
          @ 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
          301
          Accepted
          97
          Uploaded By