enter 發表於 2015-6-15 00:39:54

輸入一正數然後倒序印出來

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

int main(void){
       
int x;

printf("enter a number bigger tha 0:\n");
scanf("%d",&x);

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