#include<stdio.h>
#include<stdlib.h>
int main()
{
int one,two,answer;
while(scanf("%d%d",&one,&two)==2)
{
answer = one+two;
printf("%d\n",answer); //換行符號\n很重要,對於本系統來說有可能會造成測資錯誤
}
return 0;
}
#include
#include
int main()
{
int one,two,answer;
while(scanf("%d%d",&one,&two)==2)
{
answer = one+two;
printf("%d\n",answer); //換行符號\n很重要,對於本系統來說有可能會造成測資錯誤
}
return 0;
}
想請問一下,scanf("%d%d",&one,&two)==2 的 「==2」是甚麼意思啊?謝謝!!
#include
#include
int main()
{
int one,two,answer;
while(scanf("%d%d",&one,&two)==2)
{
answer = one+two;
printf("%d\n",answer); //換行符號\n很重要,對於本系統來說有可能會造成測資錯誤
}
return 0;
}
想請問一下,scanf("%d%d",&one,&two)==2 的 「==2」是甚麼意思啊?謝謝!!
我剛剛測試,是輸入多少個﹐輸出就多少個嗎?