c = c a "*" b "=" a * b vbTab vbCrLf
成都創(chuàng)新互聯(lián)公司成都網(wǎng)站建設(shè)按需規(guī)劃網(wǎng)站,是成都網(wǎng)站營(yíng)銷推廣公司,為除甲醛提供網(wǎng)站建設(shè)服務(wù),有成熟的網(wǎng)站定制合作流程,提供網(wǎng)站定制設(shè)計(jì)服務(wù):原型圖制作、網(wǎng)站創(chuàng)意設(shè)計(jì)、前端HTML5制作、后臺(tái)程序開發(fā)等。成都網(wǎng)站推廣熱線:028-86922220
改成 c = c vbCrLf
以為B長(zhǎng)到10的時(shí)候,才不滿足條件 跳出循環(huán)啊,但是你的b=10時(shí)候跳出了內(nèi)層,還要繼續(xù)執(zhí)行外層的語句。
其實(shí)最后A也是要到10的
因?yàn)橹挥袟l件不滿足的時(shí)候才會(huì)跳出循環(huán)
to 后面的數(shù)字相當(dāng)于限制數(shù)字
你這個(gè)字符串是哪里來的呢,標(biāo)準(zhǔn)的科學(xué)計(jì)數(shù)法也不是這樣寫的,硬要這樣寫的話,就只有寫個(gè)函數(shù)來轉(zhuǎn)換,示例如下
private?void?button1_Click(object?sender,?EventArgs?e)
{
textBox1.Text?=?"9.0*10#710;2";//注意乘方符號(hào)被百度篡改了
MessageBox.Show(F(textBox1.Text).ToString());//900
}
public?static?double?F(string?s)
{
string?f?=?s.Substring(0,?s.IndexOf("*"));
string?p?=?s.Substring(s.IndexOf("^")?+?1);
return?Convert.ToDouble(f)?*?
Math.Pow(10,?Convert.ToInt32(p));
}
淳樸,古拙,淡泊,深遠(yuǎn)。閑居山林,逍遙河上,也許人只有擺脫了物欲的禁錮,才能讓靈魂得到飛升。不識(shí)字煙波釣叟,傲殺人見萬戶侯;閑居山野的隱士,羞煞世上名利客。
斜風(fēng)細(xì)雨,江南春色,落英繽紛。春水媚,綠波盈,青山橫,白鷺飛。披蓑戴笠,心逐白云,意隨魚戲,行到水窮,坐看云起,臥聽風(fēng)韻松濤。不須歸,不須歸,只任心靈,放逐在深愛的自然里,忘世忘機(jī)。
《芥子園畫譜》云:“與山水有顧盼,人似看山,山亦似俯而看人”。司空?qǐng)D《詩(shī)品沖淡》說:“遇之非深,即之逾稀?!笨侦`天真,非性情中人而不能為。梅妻鶴子友麋鹿,是怎樣一種超逸?
Public Shared Sub Main()
Dim a As Integer, b As Integer, c As Integer, d As Integer
Console.WriteLine("該程序?qū)⑶蟪鰞蓚€(gè)矩陣的積:")
Console.WriteLine("請(qǐng)指定矩陣A的行數(shù):")
a = Integer.Parse(Console.ReadLine())
Console.WriteLine("請(qǐng)指定矩陣A的列數(shù):")
b = Integer.Parse(Console.ReadLine())
Dim MatrixA As Integer(,) = New Integer(a - 1, b - 1) {}
For i As Integer = 0 To a - 1
For j As Integer = 0 To b - 1
Console.WriteLine("請(qǐng)輸入矩陣A第{0}行第{1}列的值:", i + 1, j + 1)
MatrixA(i, j) = Integer.Parse(Console.ReadLine())
Next
Next
Console.WriteLine("矩陣A輸入完畢.")
Console.WriteLine("請(qǐng)指定矩陣B的行數(shù):")
c = Integer.Parse(Console.ReadLine())
Console.WriteLine("請(qǐng)指定矩陣B的列數(shù):")
d = Integer.Parse(Console.ReadLine())
Dim MatrixB As Integer(,) = New Integer(c - 1, d - 1) {}
For i As Integer = 0 To c - 1
For j As Integer = 0 To d - 1
Console.WriteLine("請(qǐng)輸入矩陣A第{0}行第{1}列的值:", i + 1, j + 1)
MatrixB(i, j) = Integer.Parse(Console.ReadLine())
Next
Next
Console.WriteLine("矩陣B輸入完畢.")
Console.WriteLine("矩陣A為:")
outputMatrix(MatrixA, a, b)
Console.WriteLine("矩陣B為:")
outputMatrix(MatrixB, c, d)
If b c Then
Console.WriteLine("矩陣A的列數(shù)與矩陣B的行數(shù)不相等,無法進(jìn)行乘積運(yùn)算!")
Return
Else
Console.WriteLine("矩陣A與矩陣B的乘積為:")
End If
Dim MatrixC As Integer(,) = New Integer(a - 1, d - 1) {}
For i As Integer = 0 To a - 1
For j As Integer = 0 To d - 1
MatrixC(i, j) = 0
For k As Integer = 0 To b - 1
MatrixC(i, j) += MatrixA(i, k) * MatrixB(k, j)
Next
Next
Next
outputMatrix(MatrixC, a, d)
End Sub
Private Shared Sub outputMatrix(MatrixX As Integer(,), rowCount As Integer, columnCount As Integer)
For i As Integer = 0 To rowCount - 1
For j As Integer = 0 To columnCount - 1
Console.Write(MatrixX(i, j) vbTab)
Next
Console.WriteLine()
Next
End Sub
End Class
vb.net中把兩個(gè)參數(shù)相乘用什么符號(hào)
vb.net中把兩個(gè)參數(shù)相乘用 * 符號(hào)來表示相乘,用 / 符號(hào)表示相除。
網(wǎng)站標(biāo)題:vb.net乘方 vb中乘方怎么表示
URL網(wǎng)址:http://aaarwkj.com/article26/doooscg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設(shè)計(jì)、響應(yīng)式網(wǎng)站、面包屑導(dǎo)航、網(wǎng)站制作、品牌網(wǎng)站制作、搜索引擎優(yōu)化
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)