1樓:匿名使用者
#include
#include
int main(void)
while(!(num>0 && num<10000));
int i=1, weishu=0;
for(i=1; num/i>0; i=i*10)weishu++;
printf("輸入的資料是%d位資料\n", weishu);
int num1 = num;
for(i=pow(10, weishu-1); i>=1; i/=10)
printf("\n");
num1 = num;
for(i=10; i<=pow(10, weishu); i*=10)
printf("\n");
return 0;}/*
vc++ 6.0 執行結果
請輸入一個不大於四位的資料:
1234
輸入的資料是4位資料
1 2 3 44 3 2 1press any key to continue*/
2樓:匿名使用者
#include "stdio.h"
void main()
} 這個是不多於5位的,你修改一下就可以用了
c語言題目:給出一個不多於5位的正整數,要求:1、求出它是幾位數2、分別輸出每一位數字
3樓:匿名使用者
#include
int main()
;while(1)
i=0;
dowhile(x /= 10);
printf("%d位數\n",i);
while(i >0)
printf("%d ",c[--i]);
putchar('\n');
}return 0;}
4樓:匿名使用者
//假設x為引數
int count=0;//幾位數
dowhile(x>0);
//此處輸出count
5樓:匿名使用者
#include
#include
int main(void)
.........................................僅參考
c語言如何程式設計實現給出一個不多於4位的正整數,輸出它是幾位數並且按逆序輸出每一位數字?
6樓:匿名使用者
#include
#include
int main(void)
while(!(num>0 && num<10000));
int i=1, weishu=0;
for(i=1; num/i>0; i=i*10)weishu++;
printf("輸入的資料是%d位資料\n", weishu);
int num1 = num;
for(i=pow(10, weishu-1); i>=1; i/=10)
printf("\n");
num1 = num;
for(i=10; i<=pow(10, weishu); i*=10)
printf("\n");
return 0;}/*
vc++ 6.0 執行結果
請輸入一個不大於四位的資料:
1234
輸入的資料是4位資料
1 2 3 44 3 2 1press any key to continue*/
c語言程式設計題 給一個不多於五位的正整數,要求: 1.求出它是幾位數 2.分別列印出每一
7樓:九九至上
#include
int main()
;while(1)
i=0;
dowhile(x /= 10);
printf("%d位數\n",i);
while(i >0)
printf("%d ",c[--i]);
putchar('\n');
}return 0;}
8樓:匿名使用者
這個問題不是手機能回答的
用c語言程式設計給不多於5位的正整數要求如下
include int main if p 4 if p 3 if p 2 if p 1 return 0 include include int main printf 這是一個 d位數 n i int a,b,c printf 按順序 分別輸出 回 a pow 10,i 1 b a 10 whi...
給定不多於5位的正整數,求它是幾位數並且按逆序分別輸出每
include int main scanf d x x1 x for n 0 x n printf d是 d位數 n x1,n for i 0 iprintf d a n 1 i printf n逆序輸出抄是 for i 0 iprintf d a i return 0 c語言是一門通襲用計算機編...
求關於食物的英語作文(要翻譯)不多於300詞急需
你郵箱多少,我發你郵箱去 關於食品安全的英語作文帶翻譯300字左右 as the saying goes,food is the most important thing for people.food safety is very important for people.nowadays,the...