But now I have a serious question as a beginner in programming in C...
That question is this:
I wonder if there is any possible way which allows me to input sums of integers while some of the integers are multiplications of other integers.
Without multiplications I used scanf() like this :
printf("Type an equation using only + or - for arithmetic equations including up to four numbers:");
scanf("%d %c %d %c %d %c %d", &a, &s1, &b, &s2, &c, &s3, &d);
That way scanf() reads the numbers and the coresponding symbols for the sum and afterwards I use them in my [if()]s in finding the sum which are in the rest of the program.Is there any way I can use a library function in order in place of either a, b, c or d I can enter a multiplication like 3*5 instead of an integer like 9?
Thanks in advance for the help.
Edited by Dman, 30 December 2011 - 12:27 PM.


Sign In
Create Account


Back to top









