function corrections and linking guidance

this program is currently part of my assignment.

# include <stdio.h>
# include <stdlib.h>


int set (int ff_option = 1, int set_option = 1)
{
float set_1 = 5.90, set_2 = 6.50, set_3 = 5.90, set_4 = 5.90, set_5 = 6.90, set_6 = 5.50;
int set1_qty, set2_qty, set3_qty, set4_qty, set5_qty, set6_qty;
float total_set_price;

set:
system ("cls");
printf("\n *********************************************************************");
printf("\n **** ***** ***** ** ** ***** * * * * ");
printf("\n * * * ** ** * ** * * * ");
printf("\n **** ***** * * ** * ***** * * * * * ");
printf("\n * * * * ** * * * ** * * ");
printf("\n ***** ***** * * ** * ***** * * **** ");
printf("\n *********************************************************************");
printf("\n\n Set Item Descriptions Price(RM)");
printf(" \n 1 Chicken Burger, French Fries, Carbonated Drink 5.90 ");
printf(" \n 2 Beef Burger, French Fries, Carbonated Drink 6.50 ");
printf(" \n 3 Chicken Nugget(2pcs), French Fries, Carbonated Drink 5.90 ");
printf(" \n 4 Fillet Burger, French Fries, Carbonated Drink 5.90 ");
printf(" \n 5 Fried Chicken(2pcs), French Fries, Carbonated Drink 6.90 ");
printf(" \n 6 Egg Burger, French Fries, Carbonated Drink 5.50 ");
printf("\n *********************************************************************\n");

printf("\n Enter the quantity of your choices:");
printf("\n Set Meal 1? ");
scanf("%d", &set1_qty);
printf("\n Set Meal 2? ");
scanf("%d", &set2_qty);
printf("\n Set Meal 3? ");
scanf("%d", &set3_qty);
printf("\n Set Meal 4? ");
scanf("%d", &set4_qty);
printf("\n Set Meal 5? ");
scanf("%d", &set5_qty);
printf("\n Set Meal 6? ");
scanf("%d", &set6_qty);

total_set_price = (set_1 * set1_qty) + (set_2 * set2_qty) + (set_3 * set3_qty) + (set_4 * set4_qty) + (set_5 * set5_qty) + (set_6 * set6_qty);

return ((float) total_set_price);

}

int alacarte (int ff_option = 2, int alacarte_option = 1)
{
float total_alacarte_price;
float chicken_burger = 4.90, beef_burger = 5.50, nugget = 3.00, fillet_burger = 4.70, onion_ring = 3.50;
float egg_burger = 3.90, french_fries = 2.90, sausage = 1.50, fried_chicken = 3.90;
float milo = 1.90, coffee = 1.90, tea = 1.90, carbonated_drinks = 1.90, ice_lemon_tea = 1.90, ice_blended = 2.90, ice_cream = 1.90;
int chicbur_qty, beefbur_qty, nugget_qty, fillbur_qty, onionrg_qty, eggbur_qty, frenfries_qty, sausage_qty, friedchic_qty;
int milo_qty, coffee_qty, tea_qty, cardrinks_qty, iltea_qty, iceblend_qty, icecream_qty;

alacarte:
system ("cls");
printf("\n Ala Carte Menu");
printf("\n *********************************************************************");
printf("\n\n Foods Prices(RM) Drinks Price(RM)\n");
printf(" \n Chicken Burger 4.90 Milo 1.90");
printf(" \n Beef Burger 5.50 Coffee 1.90");
printf(" \n Chicken Nugget 3.00 Tea 1.90");
printf(" \n Fillet Burger 4.70 Ice Lemon Tea 1.90");
printf(" \n Onion Ring 3.50 Carbonated Drinks 1.90");
printf(" \n Egg Burger 3.90 ");
printf(" \n French Fries 2.90 Desserts ");
printf(" \n Chicken Sausage 1.50 Vanilla Ice Blended 2.90");
printf(" \n Fried Chicken 3.90 Chocolate Ice Cream 1.90");
printf("\n *********************************************************************\n");

printf("\n Enter the quantity for your selection:\n");
printf("\n Chicken Burger ? ");
scanf("%d", &chicbur_qty);
printf("\n Beef Burger ? ");
scanf("%d", &beefbur_qty);
printf("\n Chicken Nugget ? ");
scanf("%d", &nugget_qty);
printf("\n Fillet Burger ? ");
scanf("%d", &fillbur_qty);
printf("\n Onion Ring ? ");
scanf("%d", &onionrg_qty);
printf("\n Egg Burger ? ");
scanf("%d", &eggbur_qty);
printf("\n French Fries ? ");
scanf("%d", &frenfries_qty);
printf("\n Chicken Sausage ? ");
scanf("%d", &sausage_qty);
printf("\n Fried Chicken ? ");
scanf("%d", &friedchic_qty);
printf("\n Milo ? ");
scanf("%d", &milo_qty);
printf("\n Coffee ? ");
scanf("%d", &coffee_qty);
printf("\n Tea ? ");
scanf("%d", &tea_qty);
printf("\n Ice Lemon Tea ? ");
scanf("%d", &iltea_qty);
printf("\n Carbonated Drinks ? ");
scanf("%d", &cardrinks_qty);
printf("\n Vanilla Ice Blended ? ");
scanf("%d", &iceblend_qty);
printf("\n Chocolate Ice Cream ? ");
scanf("%d", &icecream_qty);

total_alacarte_price = (chicken_burger * chicbur_qty) + (beef_burger * beefbur_qty) + (nugget * nugget_qty) +
(fillet_burger * fillbur_qty) + (onion_ring * onionrg_qty) + (egg_burger * eggbur_qty) + (french_fries * frenfries_qty) +
(sausage * sausage_qty) + (fried_chicken * friedchic_qty) +(milo * milo_qty) + (coffee * coffee_qty) + (tea * tea_qty) +
(carbonated_drinks * cardrinks_qty) + (ice_lemon_tea * iltea_qty) + (ice_blended * iceblend_qty) + (ice_cream * icecream_qty);

return ((float) total_alacarte_price);
}


int fastfood(int code = 1)
{
int ff_option, alacarte_option, set_option;
float total_set_price, total_alacarte_price, discount_rate,discount, GSTax, total_meal_price, total_amount, amount;
ffmainmenu:
system ("cls");
printf("\n Fastfood Ordering System");
printf("\n*************************************");
printf("\n Select an options:");
printf("\n 1. Sets Meal");
printf("\n 2. Ala Carte");
printf("\n\n Options : ");
scanf("%d", &ff_option);

switch (ff_option)
{
case 1:
total_set_price = set (ff_option = 1);
printf("\n Would you like to order some add-ons?");
printf("\n 1. Yes");
printf("\n 2. No\n Decision: ");
scanf("%d", &alacarte_option);

if (alacarte_option == 1)
{
total_alacarte_price = alacarte (alacarte_option = 1);
}
else
{
total_alacarte_price = 0.00;
}

case 2:
total_alacarte_price = alacarte (ff_option = 2);
printf("\n Would you like to order some set meals?");
printf("\n 1. Yes");
printf("\n 2. No\n Decision: ");
scanf("%d", &set_option);

if (set_option == 1)
{
total_set_price = set ( set_option = 1);
}
else
{
total_set_price = 0.00;
}

}

total_meal_price = total_set_price + total_alacarte_price;

if (total_meal_price >= 50.00)
{
discount_rate = 0.1;
}
else
{
discount_rate = 0;
}

discount = total_meal_price * discount_rate;
amount = total_meal_price - discount;
GSTax = amount * 0.05;
total_amount = amount + GSTax;
result:
system ("cls");
printf("\n\n Dear Customer,");
printf("\n\n Your payment details as below:");
printf("\n\n Total: RM %3.2f",total_meal_price);
printf("\n\n Discount: RM %3.2f",discount);
printf("\n\n Gov. Tax 5%: RM %3.2f",GSTax);
printf("\n\n Grand Total: RM %3.2f\n\n",total_amount);

return ((float) total_amount);
}


when the program is in this format, it's working. However, when it contains some sequence error. the program suppose to prompt a user choice to choose whether fastfood ordering or etc. when user choose fastfood ordering, they still have to make choice between set meals and ala carte order. Now, my problem is when user choose to have a set meals, it call the set meal function, but at the end, it will prompt for user choice whether to have some add-ons or not. if user choose no for it, it still link to the alacarte function instead of showing the result. besides, if user enter 0 in all the variables prompted in ala carte function, the payment result shows 0. Can anyone help me to have a look between the linking?
In addition, when i move the set and alacarte function below the fastfood function, it will have linking error (LNK2019) and sometimes error for redefinition of parameter. Can anyone explain and tell me what is the correction for it?
thank you very much.

You are missing a break; in case 1.
Topic archived. No new replies allowed.