Use Visual Basic language
The function, FindAreaOfTriangle, calculates the area of a triangle given the base and height. Write code that calls the function with: Base = 8; Height = 16.3 and returns the answer to dblAreaOfTriangle.
Function FindAreaOfTriangle(dblBase As Double, dblHeight As Double) As Double
Dim dblArea As Double
dblArea = (dblBase * dblHeight) / 2
Return dblArea
End Function
Display keyboard shortcuts for Rich Content Editor
Dear Student ,
As per requirement submitted above kindly find below solution.
Here new Console Application in VB is created using Visual Studio 2019 with name "AreaCalculator".This application contains a module with name "Module1.cs".Below is the details of this module.
Module1.vb :
Module Module1 'VB Module
Sub Main() 'Main procedure
'declaring variable to store area of triangle
Dim dblAreaOfTriangle As Double
'call method and store area in the dblAreaOfTriangle variable
dblAreaOfTriangle = FindAreaOfTriangle(8, 16.3)
'print area of triangle
Console.WriteLine("Area of Triangle with 8 base and 16.3 height is
" & dblAreaOfTriangle)
End Sub
'Function to calculate are of triangle
Function FindAreaOfTriangle(dblBase As Double, dblHeight As Double)
As Double
'declaring variable dblArea of Double type
Dim dblArea As Double
'calculate are of triangle
dblArea = (dblBase * dblHeight) / 2
'return are of triangle
Return dblArea
End Function
End Module
==================================
Output :Run application using F5 and will get the screen as shown below
Screen 1:

NOTE :PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.
Use Visual Basic language The function, FindAreaOfTriangle, calculates the area of a triangle given the base...
Visual Studio - Printf and Scanf Create a function called area that calculates the area of a triangle. The function requires 2 parameters/arguments. The variables passed to the function are called base and height. To calculate the area multiply height times the base. In addition to the function add your code to both prompt for the values of area and height and base and then call the area function to display/print the area.
Question 4 Write a program that display the area of a triangle. The program calls the following two functions: .getBaseHeight - This function uses a reference parameter variables to accept a double arguments base and height. This function should ask the user to enter the triangle's buse and height. Input validation: base and height should be positive numbers. calArea - This function should accept the triangle's base and height as arguments and return the triangle's area. The area is calculated...
Using the c++ language 1) Create a function that calculates the area of a circle "circeArea ()". The function should take a single float parameter radius and return a float area. 2) Create a function to calculate the area of a rectangle. 3) Creat a function to calculate the area of a triangle when given base and height as parameters provided by the user.
Create and call a function Using the Visual Basic Editor: create a VBA procedure named call_function that does the following: Prompts the user, using two input boxes, for the height and the radius of the base of a cone. Calls a function named cone_volume and passes the two values to it. Receives a value back from the function and displays it in a message to the user. Create a function named cone_volume that does the following: Receives the two values...
Problem: Given information about a circle, rectangle and a triangle, calculate the area of the shape from the information supplied. Write pseudocode to solve this problem and write a Python program that asks the user to input the required information for a shape and then calculates the area of the shape. Geometry Calculator 1. Calculate the Area of a Circle 2. Calculate the Area of a Rectangle 3. Calculate the Area of a Triangle 4. Quit Enter your choice (1...
Q2) Interface Create a program that calculates the perimeter and the area of any given 2D shape. The program should dynamically assign the appropriate calculation for the given shape. The type of shapes are the following: • Quadrilateral 0 Square . Perimeter: 4xL • Area:LXL O Rectangle • Perimeter: 2(L+W) • Area:LxW Circle Circumference: I x Diameter (TT = 3.14) Area: (TT xD')/4 Triangle (assume right triangle) o Perimeter: a+b+c O Area: 0.5 x base x height (hint: the base...
*****language : java****** ceate a class RightTriangle with three instance variables of type double called base, height, and hypotenuse and three instance variables of type int called ID, xLoc and yLoc. Also add a static variable of type double called scaleFactor. This should be initialized to a default value of 1. Then define an appropriate constructor that takes initial values for all instance variables except hypotenuse and sets the values of all instance variables including calculating the hypotenuse. Then define...
Microsoft Excel VBA (Visual Basic for Applications) Programming
Language
Objectives: Create an array and redim it to a size equal to an
assigned value of a variable, populate the array with a series of
random numbers, output the array to a message box and to a
worksheet.
Instructions:
- Review the variables already declared. You won't need
others.
- See comments in the code that will act as your guide. Add new
code directly after each comment.
- Assign a...
PLEASE USE VERY BASIC REGISTERS AND CODE TO DO THE FOLLOWING Objectives: -write assembly language programs to: -define a recursive procedure/function and call it. -use syscall operations to display integers and strings on the console window -use syscall operations to read integers from the keyboard. Assignment Description: Implement a MIPS assembly language program that defines "main", and "function1" procedures. The function1 is recursive and should be defined as: function1(n) = (2*n)+9 if n <= 5 =...
I am trying to build a program in Visual Basic that allows user
to enter an objects mass and velocity and to display the Kinetic
energy. The application should have a function KineticEnergy that
accepts a moving objects mass and velocity as arguments. The
function should return the objects KE.
i get these three errors when trying to run the program I need
help how would I fix this so it runs successfully? Thanks in
advance!
Start 16 ml.vb* +...