How To Convert Math Into Coding
Nov 24, 2010
I am building a tool to figure out final value fees. This is the math i have to try to code
$1,000.01 or more 8.75% of the initial $50.00, plus 4.0% of the next $50.01 - $1,000.00, plus 2.0% of the remaining final sale price balance ($1,000.01 - final sale price)
View 8 Replies
ADVERTISEMENT
Apr 19, 2011
I'm creating an emulator for a device to simulate wave forms. My challenge is that when I try to convert the output of the following code, I can't convert the Math.Sin's double output into byte values that lend themselves to the byte array format required by an existing graphing control as listed at bottom below. I''m not sure how to handle this when the sin function creates negative values but the byte values will need to be positive and basically 'shifted up' so that anything over 127 is negative. (0 - 255) unsigned. BitConverter.GetBytes has been suggested but THIS is the result of that attempt.
[Code]....
View 2 Replies
Mar 5, 2012
well i am having a couple of issues with this particular homework problem and this is my first programming class so there is probably quite a few mistakes well the homework problem is to take three double values entered by a user and display the largest and smallest using math.max and math.min and display the smallest and largest so i thought i could use a listbox and take the values that went to the listbox and assign variables to each so i can try to use each variable in the math.max and min but im not making it to far and i actually might be way off
[Code]...
View 4 Replies
Jan 29, 2010
I want to convert pdf file into xls using vb.net. How can i do it? I don't want any third party software.
View 1 Replies
Oct 15, 2011
I am using ASP.NET to develop a system. Would you mind to share with me whether the code can be encrypted or convert to DLL to prevent coding exposure to other?
View 6 Replies
Oct 19, 2009
I'm currently taking a VB class as a complimentary in college, so keep in mind that I'm lowest of the low when it comes to this. For my assignment, using a console application, I need to create a pyramid of stars, such as this:
Enter number of stars: 3
***
**
*
So far, I've gotten to the point where it'll display enter number of stars: 3
3
2
1
How do I convert the numbers into the symbol?
View 14 Replies
May 7, 2009
Say we have a DataGridView on the main form. I can chose to establish its properties by code or by selecting them in the Properties panel. Is there a difference between these two techniques, a loading time penalty in any of the cases especially?
View 5 Replies
Aug 20, 2009
I,m developing a debt calculation program 'my problem is when i have to calculate the months to pay back the debt it comes to 28.04 and i have to get it to 29 my code looks like this:
[Code]...
View 3 Replies
Mar 29, 2012
How can I round 4.39 to 5 in VB.NET? I tried:
Math.Round(4.39, 0)
But it displays 4.
View 1 Replies
Jan 27, 2012
I am trying to perform a simple multiplication in vb.
Below is my code:
Dim minus As Integer
Dim minusPrice As Integer
Dim totalPrice As Integer
[Code].....
View 4 Replies
Jul 29, 2011
I've been having a problem with Math.Log in a function I'm trying to write. When working with variables, it always returns 0. Here's the line I'm trying to run:
Quote:
mb = txtMb.Text
k = txtK.Text
t = txtT.Text
[Code].....
View 5 Replies
May 8, 2009
I am trying to use Math.round. now my math.round (2.5) converting it to 2. O want to convert it to 3.
View 6 Replies
Apr 13, 2012
I am trying to do math (-, +, *, etc) based on what a user selects from a combo box. The combo has the operators (-, +, *, /) in its items list. when the user selects one of them, I want to use that operator with the two numbers the user also provides from two text boxes.
dim intNumOne as integer
dim intNumTwo as integer
dim intAnswer as integer
[Code]....
'I don't think I want to concatenate here. but this is what I would like to happen (use the operator based on the users selection from the combo and the two numbers from the text boxes. I know I could write a select case or If statement but is there a way to do what I'm trying to do without Select Case or If? I tried to make theOperator a 'char' type variable but that didn't work either.
View 3 Replies
Sep 20, 2009
Is there any way to parse a string in vb.net (like, built in methods), that can do math like Eval can? For example, 3+(7/3.5) as a string would return 2.
I am not asking for you to code this for me, I just want to know if there is a built in way to do this, if there is not I will code it myself.
I can wager that it would not be able to parse stuff like Sin(90) on its own, and I understand that would need to be replaced by Math.Sin(90).
View 5 Replies
Oct 29, 2009
I have tried following coding to get highest value.EX: If I type 4.341111111111, It should get the value 4.35. If I type 9.132222, It should be 9.14 not 9.13.[code]
View 9 Replies
Jul 13, 2011
I'm using .Net 3.51 SP1. I've been having problems with .Net's inability to add single numbers, could anyone throw some light on this.
[Code]...
View 12 Replies
Jun 17, 2010
I am trying to create a small application which does mathematical calculations using dates and times. Specifically, to determine the period of time between two specific dates and times.
View 2 Replies
Mar 1, 2012
I have a strange result coming from some big math & have no clue as to why I'm getting a different answer from vb.net vs python.Here are the quick snippets & results:
VB.NET
Dim MSB As UInt32 = 3067297518
Dim LSB As UInt32 = 1439785590
[code]......
View 1 Replies
Feb 23, 2012
I've a problem using simple logarithm function Log in some ButtonClick Event. Log is underlined with next warning:System.Diagnostics.Log is not accessible in this context because it is Friend.
Have I missed something or this happens because of the Express version of Visual Basic?
View 1 Replies
Oct 17, 2009
1. The lens equation for a camera is 1/f=1/di+1/de , where f is the focal length of the lens, is the distance between the lens and the film, and is the distance between the lens and the object. For a certain camera, an object that is 18 cm from the lens is in focus when the lens is 9 cm from the film. What is the focal length of the lens?
View 1 Replies
Nov 27, 2010
Is there some interface I can implement to allow basic comparisons and math to happen as it would an integer?
For example, let's say I have the following class:
Public Class Something
Public SomeBigNumber as UInt64
End Class
I would like to do something like this:
Dim SomethingA, SomethingB, SomethingC as New Something
....
If (SomethingA-SomethingB) > SomethingC Then
'Do stuff
End If
I was hoping to be able to implement some interface (if that is even the right term for it) that would return the UInt64 contained in the class for comparison and math, if possible.
View 1 Replies
Apr 15, 2011
I have to use a round method that follows this behavior:
7.00 -> round -> 7
7.50 -> round -> 7
7.51 -> round -> 8
I tried to use Math.Round, but it works a little bit different.
[Code]...
How can I implement my rounding logic?
View 4 Replies
Mar 13, 2010
How to get numbers from a text box then use them in a math operation.
View 4 Replies
Mar 24, 2010
Similar in concept to Math.Abs() - I'm looking for a function that when given a positive integer will return the same integer. If given a negative, will return zero.
So:
f(3) = 3
f(0) = 0
f(-3) = 0
Yes, this is simple enough to write on my own but I'm wondering if the .NET Math class already has this built in or if the same can be achieved by cleverly chaining a few Math.* calls?
View 4 Replies
Dec 11, 2009
I am trying to figure out a calculation I can perform in C# to determine the rows per column. Let's say I know I am going to have 3 columns and my record count is 46. I know that I can mod the results to get a remainder, but I would like something more efficient than what I have tried. So I know I will have 16 rows per column with a remainder of 14 for the last column, but what is the best way to loop through the resutls and keep counts.
View 1 Replies
Oct 6, 2009
I have 36 numbers in sets of 5. (eg. 1-2-3-4-5, 2-3-4-5-6 etc..) I need to find all the possible combinations of these numbers which total the same sum. For instance the lowest sum would be: 1 + 2 + 3 + 4 + 5 = 15. The highest possible sum is: 32 + 33 + 34 + 35 + 36 = 170. Now every five number combination within these 36 numbers will sum up between 15 and 170. How would I go about this in vb.net to produce all the possible combinations which would total say 92.
View 6 Replies
Jan 31, 2012
For some reason the exception is caught sometimes it's not?Here is the code:
[code]...
View 21 Replies
Jan 9, 2007
does VB.NET include the Mathematical Integration/Derivation functions in the Library? If so where are
they, I couldn't find them? If not, any third-party libraries you would recommend?
View 3 Replies
Mar 13, 2012
Im working with a Picturebox in VB using the following basic math equations. [code]I believe that this equation assumes I am working in a coordinate plane where the following is true (0,0) is the bottom left corner of the Positive quadrant
-x increases as you move right
-y increases as you move up
I am working in a coordinate plane where the following is true (0,0) is the Top left corner of the positive quadrant
-X increases as you move right
-Y increases as you move down
The issue is I am not sure how this will affect my original equation for intersection point.
View 3 Replies
May 12, 2011
I'm having a problem with the Math.Abs statement. When I try to use this statement to figure the absolute value of a number, as in:
View 3 Replies