代码:
#include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { int original; do{ printf("Enter a two-digit number:"); scanf("%d",&original); int ten=original/10; int ge=original%10; printf("The reversal is %d%d ",ge,ten); }while(original!=999); return 0; }
输出:
Enter a two-digit number:25 The reversal is 52 Enter a two-digit number:16 The reversal is 61 Enter a two-digit number:96 The reversal is 69 Enter a two-digit number:19 The reversal is 91
--2020年6月10日--