Write a program to perform specified Arithmetic Operation on two given numbers

Perform Specific Operation: In its simplest meaning, an operation is an action or procedure which produces a new value from one or more input values, called "operands". The values combined are called operands, arguments, or inputs, and the value produced is called the value, result, or output.
                                   (Operands) 5+3=8(Result)
Addition is a mathematical operation that represents the total amount of objects together in a collection. It is signified by the plus sign (+). For example, there are 5 + 3 apples—meaning three apples and two apples together, which is a total of 8 apples. Addition can also represent combining other physical and abstract quantities using different kinds of objects: negative numbers, fractions, irrational numbers, vectors, decimals, functions, matrices and more.
Subtraction is a mathematical operation that represents the operation of removing objects from a collection. It is signified by the minus sign (-). There are 8 - 3 apples—meaning 8 apples with 3 taken away, which is a total of 5 apples. Subtraction can also represent combining other physical and abstract quantities using different kinds of objects: negative numbers, fractions, irrational numbers, vectors, decimals, functions, matrices and more.
 
Operator
Comments
+
Adds two numbers. Also concatenates strings but avoid this use because Visual Basic will try to convert the string to a number first and the results might not be what you expect.
-
Subtract the second number from the first.
*
Multiply two numbers. The result will be promoted to whatever data type is needed to represent the size of the number if one of the numbers is already that type (see note below about odd behaviour).

/
Normal division. Treats both operands as real numbers and returns a real result.


VB Script program will be as shown:-


Out Put for ADD Operation






Out Put For the Subtract Operation









Out Put For the Multiplication







Out Put For the Division







No comments:

Post a Comment