i was wondering if it is possible to have a scanf in a for loop and keep each value the user inputs? how can i store each value the user inputs?
i need to keep each value because the program takes input from the user and takes the derivative of the polynomial. now i am using a for loop but i don't know how to keep each value for the scanf. am i approaching this the wrong way? what can i do? here is the part of the code. (it repeats for as many values of "a" there is).
Code:
for(b = 0; b <= a; b++)
{
printf("Enter coefficient for x^%d: ", b);
scanf("%d", &c);
}