W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
這里,具有最高優(yōu)先級(jí)的運(yùn)算符出現(xiàn)在表的頂部,具有最低優(yōu)先級(jí)的運(yùn)算符出現(xiàn)在底部。 在表達(dá)式中,將首先計(jì)算較高優(yōu)先級(jí)運(yùn)算符。
操作符 | 優(yōu)先級(jí) |
---|---|
Await | 最高 |
Exponentiation (^) | |
Unary identity and negation (+, -) | |
Multiplication and floating-point division (*, /) | |
Integer division (\) | |
Modulus arithmetic (Mod) | |
Addition and subtraction (+, -) | |
Arithmetic bit shift (<<, >>) | |
All comparison operators (=, <>, <, <=, >, >=, Is, IsNot, Like, TypeOf...Is) | |
Negation (Not) | |
Conjunction (And, AndAlso) | |
Inclusive disjunction (Or, OrElse) | |
Exclusive disjunction (Xor) | 最低 |
Module assignment
Sub Main()
Dim a As Integer = 20
Dim b As Integer = 10
Dim c As Integer = 15
Dim d As Integer = 5
Dim e As Integer
e = (a + b) * c / d ' ( 30 * 15 ) / 5
Console.WriteLine("Value of (a + b) * c / d is : {0}", e)
e = ((a + b) * c) / d ' (30 * 15 ) / 5
Console.WriteLine("Value of ((a + b) * c) / d is : {0}", e)
e = (a + b) * (c / d) ' (30) * (15/5)
Console.WriteLine("Value of (a + b) * (c / d) is : {0}", e)
e = a + (b * c) / d ' 20 + (150/5)
Console.WriteLine("Value of a + (b * c) / d is : {0}", e)
Console.ReadLine()
End Sub
End Module
Value of (a + b) * c / d is : 90
Value of ((a + b) * c) / d is : 90
Value of (a + b) * (c / d) is : 90
Value of a + (b * c) / d is : 50
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: