Another problem has occoured. How can I get the highlighted function to run? Whenever I run the program, the function is totally skipped.
void add()
{
int vala, valb, valc, bog=5, count;
char alakazam;
double log[0], vald, valf;
clearer();
do
{
for(count = 0; count < 5; count++)
{
vala = getint("Product Number", mnum, maxnum);
valb = getint("Product Type", mtype, maxtype);
valc = getint("Quantity", minquan, maxquan);
vald = getreal("Cost", mincost, maxcost);
show_costs(log, vald);
valf = getreal("Price", minprice, maxprice);
show(vala, valc, vald, valf);
}
printf("Again? (Y/N)");
scanf("%c%*c", &alakazam);
}
while(alakazam == 'Y' || alakazam == 'y');
return;
/*==============================================*/
double show_costs(double n[], double c)
{
int scrub=0, bammo;
if(scrub < 5)
{
n[scrub] == c;
scrub++;
}
else
{
printf("Type-------------------------Cost");
for(bammo=0; bammo < 5; bammo++);
printf("%d:---------------------------%lf", bammo, n[bammo]);
getchar();
}
return 0;
}
/*====================================================================*/