看板 NCCU08_Math 關於我們 聯絡資訊
※ 引述《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