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
Solved

Converting this calculation to VB.Net

Posted on 2013-11-07
2
177 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
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get Client IP on RDS - VB.NET 15 67
vb.net class 3 21
How to duplicate form in Visual Studio 2015 2 58
Need syntax help building hyperlink 2 24
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

840 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