C++实现整数反序输出
时间:2014-10-19 14:05:57
收藏:0
阅读:340
// 2.cpp : Defines the entry point for the console application. // 整数反序输出 #include "stdafx.h" #include "iostream.h" void main () { int a,b,c; cin>>a; b=0; do{ c=a%10; a=a/10; b=b*10+c; }while(a); //做判断 cout<<b<<endl; }
原文:http://www.cnblogs.com/hardwork/p/4034828.html
评论(0)