Solved

Converting this calculation to VB.Net

Posted on 2013-11-07
2
180 Views
Last Modified: 2013-11-07
Please see the attached screenshot. I need to make this calculation in a VB.Net app and I'm not sure what functions to use and how to format it. Any ideas? Also, how can it be validated?

Thanks!
Calculation.jpg
0
Comment
Question by:BlakeMcKenna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
Jesus Rodriguez earned 500 total points
ID: 39631008
If you got the list of the d number, the values for N1 and M1 then will be something like this

        Dim ListOf_d_Numbers As List(Of Double) = New List(Of Double)
        Dim SumOf_D_numbers As Double = 0
        Dim SM1 As New Double
        Dim N1 As New Double
        Dim M1 As New Double
        For Each NumberInList As Double In ListOf_d_Numbers
            SumOf_D_numbers += Math.Pow(NumberInList, 2)
        Next
        If (N1 - M1 - 1) = 0 Then
            MsgBox("Can Not be divide by 0")
        Else
            If (N1 - M1 - 1) < 0 Then
                MsgBox("Can not get Square root from a negative number.")
            Else
                SM1 = Math.Sqrt(SumOf_D_numbers / (N1 - M1 - 1))
            End If
        End If
0
 

Author Comment

by:BlakeMcKenna
ID: 39631707
Thanks k-designers!!! That worked!
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question