Show Bid Request
a number function
Bid Request Id: 61292
|
|
|
Description:
I need a function built where the parameters would be the number chosen and the multiplier. Here is an example. If the number chosen is one and the multiplier is 3, then the function would return 1. The same with 2 or 3. However, if the number chosen is four and the multiplier is 3, then it would return 2 because from 1 to the number is 1 and that number +1 plus number - 1 would be 2, etc. Here is an example of the first three assuming multiplier is 4 if chosen was 1 to 4 then return 1 if chosen was 5 to 8 then return 2 if chosen was 9 to 12 then return 3 Another example where multiplier is 3 1 to 3=1 4 to 6=2 7 to 9=3 The formula chosen/multiplier almost works. However, the only problem is it rounds numbers. This is not correct. If there is a way to force it to not round, then this would be perfect. Otherwise, there needs to be another way. I would prefer it to force it to not round if possible since that would be the simpliest formula.
Deliverables: The completed function to show the number function with no rounding (if not possible, then using a different formula or series of formulas). For the project just use these two lines of code for the main procedure dim numberfunction as integer numberfunction(1, 3) msgbox newnumber this name can be whatever name you want to call for the function. where 1 equals the chosen and 3 equals the multiplier. I may change the values so it must work consistent no matter what numbers are chosen assuming integer variable type (will never needs numbers beyond 33167 for example.) The message box will show the it gives the correct number. This needs to be completed within 24 hours of accepting the bid at the most.
Platform:
Windows 98, Windows 2000, Windows XP
Must be 100% finished and received by buyer on:
May 6, 2003 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
This bid was accepted by the buyer!
|
$4 (USD)
|
May 4, 2003 1:48:26 PM EDT
|
10
(Excellent)
|
|
|
If you consider this code is what you want than consider us the winners and don't forget to give us a 10 rate. We look forward to work with you on other projects. A bonus will be appreciated as well.
Dim number As Integer Dim multiplier As Integer
Function f(n As Integer, m As Integer) As Integer If n Mod m = 0 Then f = n / m Else f = Int(n / m) + 1 End If End Function
Private Sub Form_Load() number = 8 multiplier = 3 MsgBox f(number, multiplier) End Sub
Regards, Cozmin Tircob
LARK COMPUTERS SRL |
|
|
|
|
|