My project is to build a hotel menu and billing program. The problem is I have to use user defined functions to do it.
1st Function
int password(char usr_name[8], char pwd[]);
{
int j=0,k=0,i=0,m=0;
corr[8]=pizzaboy;
for(i=0;usr_name[i]!='\0';i++)
{
if (usr_name[i]=corr[i])
n=1;
}
else
n=0;
po[5]=qwerty;
for(j=0;pwd[j]!='/0';j++)
{
if (pwd[j]=po[j])
m=1;
else
m=0;
}
if (m=1 && n=1)
{
k=1
}
else
The second function is to input the menu in 2-D array, and prices in 1-D array.
and display the Hotels name.
OUTPUT SCREEN
Hungry Kya??
Menu card
.............................................................................................................price
1. Burger .................................................................................................. 50
2. Patty .................................................................................................. 25
Now hoe do I get a function to take instructions many a times ??
I have been given the first line of the function
void Menu(char list[5][20], float price[5]);
Further, I have to store the users input in another array and give the total by comparing to the fuction.
I am done with the first function but the menu function is a real pain in the a*s.