I want to take integers like that
1 2 3
4 5 6
Than I should sum them with same line like
1+4=5
2+5=7
3+6=9
And I should print 5 7 9. To do this I tried to take values from user in this way but only first scanf is running and the other is not.What is the reason for that and how can I fix it or is there any other useful way to do that?(How many value will user enter is unknown.)
char s1[21];
scanf("%[^\n]", s1);
char s2[21];
scanf("%[^\n]", s2);
for(int i =0; i<b1; i++)
printf("%d ",s1[i]+s2[i]);