View Code of Problem 110

#include<stdio.h>
void main()
{
  int a[n][2];
  int i,j,a,b,n;
  for(i=0;i<n;i++)
    for(j=0;j<2;j++)
    {
      scanf("%d %d",&a,&b);
  printf("%d\n",a+b);
    }
}  

/*
Main.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
 void main()
      ^
Main.c: In function 'main':
Main.c:4:9: error: 'n' undeclared (first use in this function)
   int a[n][2];
         ^
Main.c:4:9: note: each undeclared identifier is reported only once for each function it appears in
*/

Double click to view unformatted code.


Back to problem 110