#include<stdio.h>
int main(){
int n,a,b;
scanf(\"%d\",&n);
while (n--){
scanf(\"%d %d\",&a,&b);
printf(\"%d\",a+b);
}
return 0;
}他这个是输入一行,回车,出来一行,怎样改,让他输入好几行,出来好几行
#include<stdio.h>
int main()
{
int n,a,b;
int c[100];
scanf("%d",&n);
int d = n;
while (d--)
{
scanf("%d %d",&a,&b);
c[d] = a + b;
}
while (n--)
{
printf("%d ",c[n]);
}
return 0;
}