Click here to Skip to main content
15,905,419 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get the dynanic part of an website ? Pin
K.A.L20-Mar-06 9:41
K.A.L20-Mar-06 9:41 
GeneralRe: How to get the dynanic part of an website ? Pin
darkelv21-Mar-06 0:34
darkelv21-Mar-06 0:34 
GeneralRe: How to get the dynanic part of an website ? Pin
K.A.L21-Mar-06 10:41
K.A.L21-Mar-06 10:41 
Questioninterface(s) on inheritance Pin
spin vector20-Mar-06 7:10
spin vector20-Mar-06 7:10 
AnswerRe: interface(s) on inheritance Pin
Robert Rohde20-Mar-06 7:32
Robert Rohde20-Mar-06 7:32 
AnswerRe: interface(s) on inheritance Pin
Curtis Schlak.20-Mar-06 7:37
Curtis Schlak.20-Mar-06 7:37 
GeneralRe: interface(s) on inheritance Pin
spin vector20-Mar-06 9:19
spin vector20-Mar-06 9:19 
GeneralRe: interface(s) on inheritance Pin
Curtis Schlak.20-Mar-06 15:11
Curtis Schlak.20-Mar-06 15:11 
GeneralRe: interface(s) on inheritance Pin
spin vector21-Mar-06 9:46
spin vector21-Mar-06 9:46 
Questionadd text to anywhere in MS word document Pin
de_Oracle20-Mar-06 6:28
de_Oracle20-Mar-06 6:28 
QuestionChanging the ZoomFactor in a CrystalReportViewer Pin
Code Toad20-Mar-06 6:10
Code Toad20-Mar-06 6:10 
AnswerRe: Changing the ZoomFactor in a CrystalReportViewer Pin
Code Toad20-Mar-06 7:45
Code Toad20-Mar-06 7:45 
QuestionRetrieve workgroup name in C# Pin
hops33n20-Mar-06 6:06
hops33n20-Mar-06 6:06 
AnswerRe: Retrieve workgroup name in C# Pin
Richard Deeming20-Mar-06 8:32
mveRichard Deeming20-Mar-06 8:32 
AnswerRe: Retrieve workgroup name in C# Pin
Richard Deeming21-Mar-06 2:23
mveRichard Deeming21-Mar-06 2:23 
QuestionMultiDimensional Arraylists question Pin
kpkr20-Mar-06 6:01
kpkr20-Mar-06 6:01 
AnswerRe: MultiDimensional Arraylists question Pin
Steve Hansen20-Mar-06 6:33
Steve Hansen20-Mar-06 6:33 
GeneralRe: MultiDimensional Arraylists question Pin
kpkr20-Mar-06 9:24
kpkr20-Mar-06 9:24 
QuestionFile and Directory Classes Pin
binaryfreak20-Mar-06 4:56
binaryfreak20-Mar-06 4:56 
Questioncombobox usage Pin
bazzanewt20-Mar-06 4:48
bazzanewt20-Mar-06 4:48 
AnswerRe: combobox usage Pin
Gulfraz Khan20-Mar-06 6:22
Gulfraz Khan20-Mar-06 6:22 
QuestionGoostavo Problem solution Pin
rerebest20-Mar-06 3:23
rerebest20-Mar-06 3:23 
please i need the answer for this problem using c#.
i believe it is a very famous one but i can not get the code.
the problem is down here




Problem:
Christmas is near, and Goostavo is preparing to buy Chriastmas presents!
He has one problem though, and you will have to help him with that.
Goostavo still doesn't know for how many people is he going to buy
presents. He also doesn't know his budget, and how big bag he is going to
carry for the presents. Actually, Goostavo doesn't know anything at all,
right now.
When Goostavo finds out all of those three things, he will have to go and
buy the presents. He must buy equal amount of presents for each person,
otherwise someone may get offended! He also wants to spend as much
money from the bugest, as possible!
You will have to write a function, that will calculate the maximum amount
of money he is going to spend from his budget.
Here is what you will be given:
1) The amount of money Goostavo has for spending.
2) The volume of the bag, in which he will carry the presents.
3) The number of people he has to buy presents for.
4) The number of presents in the store.
5) Volume and price for each present.
The function will look like that:
public static float Contest7(float budget, float bagVolume, int people, int
Npresents, float [] presentVolume, float [] presentPrice);
Example input:
budget = 183.23
bagVolume = 64.11
people = 7
Npresents = 12
presentVolume[0] = 4.53
presentPrice[0] = 12.23
presentVolume[1] = 9.11
presentPrice[1] = 45.03
presentVolume[2] = 4.53
presentPrice[2] = 12.23
presentVolume[3] = 6.00
presentPrice[3] = 32.93
presentVolume[4] = 1.04
presentPrice[4] = 6.99
presentVolume[5] = 0.87
presentPrice[5] = 0.46
presentVolume[6] = 2.57
presentPrice[6] = 7.34
presentVolume[7] = 19.45
presentPrice[7] = 65.98
presentVolume[8] = 65.59
presentPrice[8] = 152.13
presentVolume[9] = 14.14
presentPrice[9] = 7.23
presentVolume[10] = 16.66
presentPrice[10] = 10.00
presentVolume[11] = 13.53
presentPrice[11] = 25.25
Note
1) There can be two or more presents with equal price and volume!
2) The amount of presents in the store will always be greater to the
amount of people Goostavo has to buy presents for.
3) Remember: Goostavo can buy more than one present for each person,
but the amount of presents he gives to each person must be equal! i.e.
everyone gets 1 present, or everyone gets 2 presents, and so on...
4) Remember: Goostavo need to spend AS MUCH money as possible, but
not go over the budget!

M
AnswerRe: Goostavo Problem solution Pin
Steve Hansen20-Mar-06 4:33
Steve Hansen20-Mar-06 4:33 
GeneralRe: Goostavo Problem solution Pin
Dan Neely20-Mar-06 5:40
Dan Neely20-Mar-06 5:40 
AnswerRe: Goostavo Problem solution Pin
Wjousts20-Mar-06 5:18
Wjousts20-Mar-06 5:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.