Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中 
Join Delanceyplace

Sign up to receive a free quote from a non fiction book every weekday.
From our sponsors
新手- VB 程式碼問題
Oct 26th 2013, 02:19

最近才開始接觸VB

想做一個算綜合所得稅的程式

請問下如果要讓以下程式碼再輸入Y後可以重新計算

輸入N就離開的話要加入什麼指令??

還有如果要做成Windos Form的話該怎麼做??

目前的樣子
---------------------------------------------------------

Sub Main()
On Error Resume Next

Console.WriteLine("請輸入年收入:")

Dim money, cost As Integer
money = Console.ReadLine
If money <= 520000 Then
cost = money * 0.05
ElseIf money >= 520001 And money <= 1170000 Then
cost = (money * 0.12) - 36400
ElseIf money >= 1170001 And money <= 2350000 Then
cost = (money * 0.2) - 130000
ElseIf money >= 2350001 And money <= 4400000 Then
cost = (money * 0.3) - 365000
ElseIf money >= 4400001 Then
cost = (money * 0.4) - 805000
End If

Console.WriteLine("應繳金額: " & cost)
Console.WriteLine("")
Console.WriteLine("")
Console.WriteLine("是否重新輸入?(Y/N)")
End Sub

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends:

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 kkoki0httzobg 的頭像
    kkoki0httzobg

    線上遊戲排行榜2013/2014,進擊的巨人線上看,candy crush saga外掛,正妹寫真三圍

    kkoki0httzobg 發表在 痞客邦 留言(0) 人氣()