#include<stdio.h> void main() { int sum[100],a,m,n; scanf("%d",&a); for(int i=0;i<a;i++) { scanf("%d%d",&m,&n); sum[i]=m+n; } for(int j=0;j<a;j++) { printf("%d\n",sum[j]); } /* Main.c:2:6: warning: return type of 'main' is not 'int' [-Wmain] void main() ^ Main.c: In function 'main': Main.c:14:1: error: expected declaration or statement at end of input } ^ */ |
Double click to view unformatted code.