标签:翻转 val int bsp 数字 code class pre color
数字翻转
#include<stdio.h>//循环实践 int main() { int oldNumber,newNumber,digitNumber,iniValue; newNumber=0; printf("input your number:\n"); scanf("%d",&iniValue); oldNumber=iniValue; while(oldNumber!=0) { digitNumber=oldNumber%10; newNumber=newNumber*10+digitNumber; oldNumber=oldNumber/10; } printf("%d converse is %d",iniValue,newNumber); return 0; }
标签:翻转 val int bsp 数字 code class pre color
原文地址:https://www.cnblogs.com/jiangzenghui/p/12427328.html