none
Using Visual Basic, how would I solve? RRS feed

  • Question

  • Write a program that will calculate the following equations. Provide a user interface and a neat and well organized output using the output control features provided by the Visual Basic application. NOTE: e ^ 5 refers to the value e to the 5th power.

    z = x * (y – z)

    z = a + b + c / 3

    z = 8 * ( e ^ 5 ) – c

    z = a * b – ( c / 2 )

    Tuesday, June 26, 2018 4:50 AM

All replies

  • Write a program that will calculate the following equations.

    You haven't indicated what the problem is.  Show the code you are using, the test values that you are using, and the results that you expect to get.  If there is an error, indicate the line of code where the error occurs, the exact error message, and the values of the variables referred to in that line of code.  For clarity, ensure that you use variable names (including control names) that can be associated with the variables used in the expressions.

    Tuesday, June 26, 2018 4:54 AM
  • Hi 

    Thanks for contacting Microsoft. For your issue, I wonder whether you want to output an equation on a control. If so, please take the following code for reference.

    Label1.Text = (8 * (Math.E ^ 5) - c) & "=" & "8 * ( e ^ 5 ) – c"



    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Best Regards

    Alex

    Tuesday, June 26, 2018 8:31 AM
  • This is obviously a homework assignment.  While we will be happy to help you understand any points of confusion, you must start the work yourself and then ask specific questions about any part you do not understand.  If you are unable to get started, please ask your instructor for assistance.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Tuesday, June 26, 2018 11:47 AM
    Moderator
  • Write a program that will calculate the following equations. Provide a user interface and a neat and well organized output using the output control features provided by the Visual Basic application. NOTE: e ^ 5 refers to the value e to the 5th power.

    z = x * (y – z)

    z = a + b + c / 3

    z = 8 * ( e ^ 5 ) – c

    z = a * b – ( c / 2 )

    You need to do some planning.
    you have variables a,b,c,e,x,y and solution z - Seems like you need a place so someone can choose the variables values, are they whole numbers ? decimals ?

    then you need a way for someone to choose which equation and something to do to start the process of getting the answer.

    A text box can hold a number but it can also hold a non-number, so it must be checked first to avoid a crash.
    A NumericUpDown will always be a number.
    A ComboBox or a CheckedListBox or RadioButtons could hold the equations and let the user pick one.

    Think about that and look at what Acamar and Reed wrote.

    Wednesday, July 4, 2018 10:54 PM