Language: C++

//Aizu - 0015 : National Budget
#include<stdio.h>
#include<string.h>

int a[1005],b[1005];

int reverse(int *a,int l,int r)
{
	int i,t;
	for(i=l;i<=r/2;i++)
	{
		t=a[i];
		a[i]=a[l+r-i];
		a[l+r-i]=t;
	}
	return 0;
}

int main()
{
	int n,i,la,lb,lmax,c,tmp;
	char t;
	
	scanf("%d%*c",&n);		//霎灘?扈?焚?悟帥謗牙屓霓ヲ隨ヲ
	
	while(n--)		//隶。邂?	{
		la=0;		//貂?峺
		lb=0;
		c=0;
		memset(a,0,sizeof(a));
		memset(b,0,sizeof(b));
		
		while(1)	//蟄伜?謨ー蟄?		{
			t=getchar();
			if(t>='0'&&t<='9')
			{
				a[la]=t-'0';
				la++;
			}
			else if(t=='\n')
			{
				break;
			}
		}
		
		while(1)
		{
			t=getchar();
			if(t>='0'&&t<='9')
			{
				b[lb]=t-'0';
				lb++;
			}
			else if(t=='\n')
			{
				break;
			}
		}
		
		if(la>80||lb>80)		//霎灘?貅「蜃コ蛻、譁ュ
		{
			printf("overflow\n");
			return 0;
		}

		reverse(a,0,la-1);		//蜿榊髄
		reverse(b,0,lb-1);

		lmax=(la>lb)?la:lb;
		for(i=0;i<=lmax;i++)	//螟ァ謨ー蜉?ウ?		{
			tmp=a[i];
			a[i]=(tmp+b[i]+c)%10;
			c=(tmp+b[i]+c)/10;
		}

		for(i=lmax;i>=0;i--)	//霎灘?
		{
			if(a[i]!=0)
			{
				tmp=i;
				break;
			}
		}

		if(lmax+1>80)			//霎灘?貅「蜃コ蛻、譁ュ
		{
			printf("overflow\n");
			return 0;
		}

		for(i=tmp;i>=0;i--)
		{
			printf("%d",a[i]);
		}
		printf("\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:33: error: break statement not within loop or switch
   42 |                                 break;
      |                                 ^~~~~
a.cc: At global scope:
a.cc:46:17: error: expected unqualified-id before 'while'
   46 |                 while(1)
      |                 ^~~~~
a.cc:60:17: error: expected unqualified-id before 'if'
   60 |                 if(la>80||lb>80)                //霎灘?貅「蜃コ蛻、譁ュ
      |                 ^~
a.cc:66:24: error: expected constructor, destructor, or type conversion before '(' token
   66 |                 reverse(a,0,la-1);              //蜿榊髄
      |                        ^
a.cc:67:24: error: expected constructor, destructor, or type conversion before '(' token
   67 |                 reverse(b,0,lb-1);
      |                        ^
a.cc:69:17: error: 'lmax' does not name a type
   69 |                 lmax=(la>lb)?la:lb;
      |                 ^~~~
a.cc:70:17: error: expected unqualified-id before 'for'
   70 |                 for(i=0;i<=lmax;i++)    //螟ァ謨ー蜉?ウ?                {
      |                 ^~~
a.cc:70:25: error: 'i' does not name a type
   70 |                 for(i=0;i<=lmax;i++)    //螟ァ謨ー蜉?ウ?                {
      |                         ^
a.cc:70:33: error: 'i' does not name a type
   70 |                 for(i=0;i<=lmax;i++)    //螟ァ謨ー蜉?ウ?                {
      |                                 ^
a.cc:72:25: error: 'a' does not name a type
   72 |                         a[i]=(tmp+b[i]+c)%10;
      |                         ^
a.cc:73:25: error: 'c' does not name a type
   73 |                         c=(tmp+b[i]+c)/10;
      |                         ^
a.cc:74:17: error: expected declaration before '}' token
   74 |                 }
      |                 ^
a.cc:76:17: error: expected unqualified-id before 'for'
   76 |                 for(i=lmax;i>=0;i--)    //霎灘?
      |                 ^~~
a.cc:76:28: error: 'i' does not name a type
   76 |                 for(i=lmax;i>=0;i--)    //霎灘?
      |                            ^
a.cc:76:33: error: 'i' does not name a type
   76 |                 for(i=lmax;i>=0;i--)    //霎灘?
      |                                 ^
a.cc:85:17: error: expected unqualified-id before 'if'
   85 |                 if(lmax+1>80)                   //霎灘?貅「蜃コ蛻、譁ュ
      |                 ^~
a.cc:91:17: error: expected unqualified-id before 'for'
   91 |                 for(i=tmp;i>=0;i--)
      |                 ^~~
a.cc:91:27: error: 'i' does not name a type
   91 |                 for(i=tmp;i>=0;i--)
      |                           ^
a.cc:91:32: error: 'i' does not name a type
   91 |                 for(i=tmp;i>=0;i--)
      |                                ^
a.cc:95:23: error: expected constructor, destructor, or type conversion before '(' token
   95 |                 printf("\n");
      |                       ^
a.cc:96:9: error: expected declaration before '}' token
   96 |         }
      |         ^
a.cc:97:9: error: expected unqualified-id before 'return'
   97 |         return 0;
      |         ^~~~~~
a.cc:98:1: error: expected declaration before '}' token
   98 | }
      | ^