當前位置:編程學習大全網 - 編程軟體 - 求VB程序編程-輸入金額,計算出需要支付的鈔票額和張數

求VB程序編程-輸入金額,計算出需要支付的鈔票額和張數

Private?Sub?Command1_Click()

Dim?me100#,?me50%,?me20%,?me10%,?me5%,?me2%,?me1%,?je#,?x!

je?=?Text1

x?=?0

me100?=?je?\?100

je?=?je?-?me100?*?100

me50?=?je?\?50

je?=?je?-?me50?*?50

me20?=?je?\?20

je?=?je?-?me20?*?20

me10?=?je?\?10

je?=?je?-?me10?*?10

me5?=?je?\?5

je?=?je?-?me5?*?5

me2?=?je?\?2

me1?=?je

Text2?=?me100

Text3?=?me50

Text4?=?me20

Text5?=?me10

Text6?=?me5

Text7?=?me2

Text8?=?me1

x?=?Val(Text2)?+?Val(Text3)?+?Val(Text4)?+?Val(Text5)?+?Val(Text6)?+?Val(Text7)?+?Val(Text8)

Text9?=?x

End?Sub

  • 上一篇:vb 輸入兩個數m和n,且滿足m>n,求m和n的最大公約數、最小公倍數以及組合數c(m,n)的值。
  • 下一篇:對編程壹竅不通的人 如何學習
  • copyright 2024編程學習大全網