Submission details
Task:ModAdd
Sender:idan
Submission time:2016-09-24 13:26:00 +0300
Language:C++
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:20:22: error: expected '}' at end of input
  printf("%d", result);
                      ^
input/code.cpp:7:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &numA);
                    ^
input/code.cpp:8:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &numB);
                    ^

Code

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

int main(void)
{
	unsigned int numA = 0, numB = 0, i = 0, result = 0, temp = 0, power = 1;
	scanf("%d", &numA);
	scanf("%d", &numB);

	for (i = 0; i < 8; i++)
	{
		temp = ((numA % 10) + (numB % 10)) % 10;
		result += temp * power;
		//printf("%d result : %d\n", i, result);
		numA /= 10;
		numB /= 10;
		power *= 10;
	}

	printf("%d", result);