i need a syntax for this program.please!
Assume the following rules of precedence for expressions:
Highest is addition (+)
then subtraction (-)
then multiplication (*)
then division (/)
Evaluate inputs such as:
(a) 1+4*3-2/2 Output: 5*3-2/2 = 5*1/2 = 5/2 = 2.5
(b) 5-2/2+1*2 Output: 5-2/3*2 = 3/3*2 = 3/6 = 0.5
(c) 3-2+4-2+5 Output: 3-6-7 = -3 - 7 = -10
Output up to 5 decimal places if long.
Re: i need a syntax for this program.please!
Is this a homework question.
The order of precedence as I know it, evaluates + and - last, so I don't really get what you're trying to ask :confused:
Re: i need a syntax for this program.please!
I've no doubt that this IS homework and it hasn't even been posted with so much as a please help. I suggest that you try to do your own homework and if you have a specific question then ask it. Just posting here what your teacher gave you is the height of laziness.
Re: i need a syntax for this program.please!
Please refer to your other post in http://www.vbforums.com/showthread.php?t=515149
As to the source code, you will have to learn how to interpret and implement narrative description of requirements and design while you have the luxury of time to do so in school.