enter 發表於 2015-8-24 17:07:35

輸入一數字反序列印出來

#include <stdio.h>
#include <stdlib.h>

int main(void){
int x;
printf("Enter a number:\n");
scanf("%d",&x);

do{
       printf("%d",x%10);
       x=x/10;
    }while(x!=0);
       
       return 0;
}
頁: [1]
查看完整版本: 輸入一數字反序列印出來