#11508: 各位高手可以幫我看看哪裡有問題嗎?


steven253 (陳仕文)


#include <stdio.h>
#include <stdio.h>
#include <math.h>
#include <string.h>

int main()
{
int i,j,n;
int a[100];
int b[100];
int c[100];
int s[100];
while(scanf("%d",&n) == 1)
{
for(i=0;i<=n-1;i++)
{
scanf("%d",&a[i]);
scanf("%d",&b[i]);
scanf("%d",&c[i]);
}
for(j=0;j<=n-1;j++)
{
if(a[j]==1)
{
s[j]=b[j]+c[j];
}
else if(a[j]==2)
{
s[j]=b[j]-c[j];
}
else if(a[j]==3)
{
s[j]=b[j]*c[j];
}
else
{
s[j]=b[j]/c[j];
}
printf("%d\n",s[j]);

}


}


}

#11513: Re:各位高手可以幫我看看哪裡有問題嗎?


jack60126 (hadman)


 

你是想要做出,計算機的效果嗎?

將你的問題和需求,說清楚一點

不然很難幫到你

等你重新釐清問題之後 再問一次吧