@wildgoose
You're entering pounds calling it dollars.
Pound as a unit of weight not as a monetary unit.
@MrNoob
1>toupper() is defined in <ctype.h>
and I don't see it in your headers.
2>
Even though the problems mentioned in above posts are right most of them are problems due to logical thinking "Tier" "Shipping cost" and all.Ya you calling artichokes for everything is a fault,but both of you failed to notice one major problem.
switch(scanf("%d",&groc))
Scanf returns the number of inputs it has successfully read not their value so if you feed in even 3 or 2 it has successfully read one input so it returns 1. So here you are not deciding the switch upon the choice of the user at all.Because on every successful read scanf returns 1 and the user is forcibly directed to choice 1 even if he chooses 3.
It should be as :
for(;;) //Your for statement only
{
// The stuff you have written before switch
scanf("%d",&groc);
switch(groc)
{
//Switch conditions
}
//Other stuff
}
You both need to concentrate on what stuff you are dealing with.This is C language and it requires some patience and some effort.