#include <stdio.h> #include <stdlib.h> #include <string.h> void addIntStrings(char *n1, char *n2, char *res) { int value; value = atoi(n1) + atoi(n2); sprintf(res, "%d", value); } int main(void) { char a[100]; char b[100]; char res[100]; scanf("%s", a); getchar(); scanf("%s", b); getchar(); addIntStrings(a, b, res); printf("%s\n", res); return 0; }
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more