Time-and-time duplex gameplay Cost Accounting

Source: Internet
Author: User

Option explicit <br/> dim S1 $, S2 $ <br/> private sub commandementclick () <br/> dim I as double, J as double <br/> dim dblcurrentmoney as double <br/> dim dbltotalmoney as double <br/> dim dblgetmoney as double </P> <p> dim intcount as integer </ p> <p> DO <br/> dblcurrentmoney = dblcurrentmoney + 0.2 <br/> dbltotalmoney = dbltotalmoney + dblcurrentmoney <br/> If dblcurrentmoney * 3.4-dbltotalmoney> intcount * 1 then <br/> intcount = intcount + 1 <br/> S1 = S1 & round (dblcurrentmoney/0.2) & "," <br/> S2 = S2 & format (dbltotalmoney, "0.00") & "," <br/> text1.selstart = Len (text1.text) <br/> text1.seltext = format (intcount, "00") & "& round (dblcurrentmoney/0.2) &" Note ("& format (dblcurrentmoney," 0.00 ") & "yuan)" & vbtab & _ <br/> "cost:" & format (dbltotalmoney, "0.00") & vbtab & _ <br/> "get a bonus: "& format (dblcurrentmoney * 3.4," 0.00 ") &" meta "& vbtab & _ <br/>" expected net profit: "& format (dblcurrentmoney * 3.4-dbltotalmoney, "0.00 ") & "meta" & vbcrlf <br/> else <br/> dbltotalmoney = dbltotalmoney-dblcurrentmoney <br/> end if </P> <p> If dbltotalmoney> 36 then' maximum if you exceed 36 RMB, give up <br/> exit do <br/> end if <br/> loop </P> <p> text1.selstart = Len (text1.text) <br/> text1.seltext = vbcrlf & S1 & vbcrlf & S2 <br/> end sub

 

01 1 Note (0.20 yuan) Cost: 0.20 get a bonus: 0.68 yuan expected net profit: 0.48 yuan
02 3 Note (0.60 RMB) Cost: 0.80 yuan received bonus: 2.04 yuan expected net profit: 1.24 yuan
03 6 Note (1.20 yuan) Cost: 2.00 get a bonus: 4.08 yuan expected net profit: 2.08 yuan
04 11 Note (2.20 yuan) Cost: 4.20 get a bonus: 7.48 yuan expected net profit: 3.28 yuan
05 18 Note (3.60 yuan) Cost: 7.80 get a bonus: 12.24 yuan expected net profit: 4.44 yuan
06 27 Note (5.40 yuan) Cost: 13.20 get a bonus: 18.36 yuan expected net profit: 5.16 yuan
07 40 Note (8.00 yuan) Cost: 21.20 get a bonus: 27.20 yuan expected net profit: 6.00 yuan
08 59 Note (11.80 yuan) Cost: 33.00 get a bonus: 40.12 yuan expected net profit: 7.12 yuan
09 86 Note (17.20 yuan) Cost: 50.20 get a bonus: 58.48 yuan expected net profit: 8.28 yuan

Multiples of each time: 1, 3, 6, 11, 18, 27, 40, 59, 86
Cost accumulation: 0.20, 0.80, 2.00, 4.20, 7.80, 13.20, 21.20, 33.00, 50.20

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.