I am creating a database that stores details of newspapers..
When I am trying to add a record, I want to allow the user to enter the price of the newspaper.
This is the code that I am using:
However, whenever the program reaches this section the program just closes.Code:printf("\n\n\tPlease enter the weekly price of the newspaper: "); fflush(stdin); scanf("%f",paper[toprec2].price);
Can anyone suggest why this is happening and what can be done to solve it?