Answer:
See images below for code
Note the warning I have provided about program (c)
Explanation:
Note that I have given complete programs. But you are asked to only write the C segments corresponding to that problem.
In the third program, I have used the syntax
case 100 ... 102:
printf("Paid\\");
break;
This means that if the number lies in the range 100 -102 the corresponding statement will execute.
However, this is not recognized by all C compilers!
You can explain to the professor that you found this on the internet (stackoverflow.com is a great site for programing resources)
Otherwise you will have to split up that into 3 separate case statements as follows:
switch(inv)
{
case 100:
printf("Paid\\");
break;
case 101:
printf("Paid\\");
break;
case 102:
printf("Paid\\");
break;
Hope that helps you out