we have 3 mails with static price and we have rooms with it number
I created 2 array
first one (int) array with static size about room number
and another array with static size for price of mails
but;;;;
I don't understand the idea;
idea in second array only;
I don found it at yet;;;;;;;;;;;;;;;;;;;;
output it will be lik this :
------------------------------------------------------------------------------------
how many mail do you want: 2 //input
2 mail about 400$ in room number 102
press any key to continue......
------------------------------------------------------------------------------------
Can you post some more detail on the problem? Preferably post the text of the problem itself. In the example you gave, how did the program select room 102 instead of one of the other rooms?
we have 2 array
arr1[4]={10,20,30,40};//prise of each meal
arr2[4]={11,22,13,45};//number of room
the arrays are Parallel in number and size
So that if the query about the number of meals per day
If the price of $ 10 per meal for the day program is as follows
--------------------------------------------------------------------------------
Enter the number of meals - how much you want in a meal today
Example
Enter the user 1 meal in day
output
-------------------------------------------------------------
how much you want in a meal today
1
1 price of one $ 10 in room No. 11
- - - - - - - - - -
Keep in mind that everyone here is a volunteer doing this in our spare time, so sometimes you get a slow response.
Okay, the problem makes a little more sense to me now. One thing that was confusing is that your original most talked about "mail" instead of "meal"
Since they are asking about using pointers, I suspect they mean that to access arr[3], they want you to use *(arr+3), which is equivalent. Does this help?