/*
* copyright (c) 2014 , 烟台大学计算机学院
* all rights reserved .
* 文件名称 : textst . cpp
* 作者 : 孙旭明
* 完成日期 : 2014年11月17日
* 版本号 : v1.0
*
* 问题描述 :分离整数中的各位数
* 程序输出 : 几个整数
*/
#include <iostream>
using namespace std;
int gcd(int );//声明自定义函数
int main()//主函数
{
int m,n;//声明变量
while(cin>>m)//循环语句
n=gcd(m);//调用自定义函数
cout <<endl;
return 0;
}
int gcd (int x)//自定义函数
{
int r;
while (x>0)//循环语句
{
r=x%10;
cout <<r<<" ";
x=x/10;
}
cout<<endl;
return r;//返回r的值
}