作者caps5302 (賴打)
看板NCCU08_Math
標題Re: [討論] 徵求EXCEL達人幫忙解題
時間Mon Aug 17 21:32:34 2009
※ 引述《hsnu114444 (我只是QQ糖)》之銘言:
: #include <stdio.h>
: int main(){
: int a;
: printf("Enter your number:\n");
: scanf("%d",&a);
: printf("answer is %d\n",(a%11)%10);
: system("PAUSE");
: return 0;
: }
幫改寫迴圈式 科
可以輸入你想要的c直到你爽喔
#include <stdio.h>
void main{
int a;
printf("Enter your number:\n");
while(scanf("%d",&a)!=EOF){
printf("answer is %d\n",(a%11)%10);
printf("Enter your number:\n");
}
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.224.41.137
※ 編輯: caps5302 來自: 61.224.41.137 (08/17 21:37)
推 hsnu114444:你寫while(1)或while(1==1)就好了 08/17 21:38
→ caps5302:阿 Onlinejudge 要結束阿 不然會TLE 所以就讓他!=EOF 08/17 21:41
推 airsky:感謝大家熱情幫忙 可是我看不懂你們寫的阿阿阿...> <| 08/18 09:33