Written, enter a number or a positive integer of five or more, it is the reverse order output and calculates the number of several

Written, enter a number or a positive integer of five or more, it is the reverse order output and calculates the number of several

#include <iostream>
using namespace std;
int main() 
{
	long int n;int m=0;
	cin>>n;
	do
	{
	  m++;
	  cout<<n%10<<" ";
	}
	
	while(n=n/10);
	cout<<m;
	return 0;
}

Guess you like

Origin blog.csdn.net/weixin_43822669/article/details/90545776