ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°Ý°ï¿n±Æ§Ç »¼°j §¹¥þ¤G¤¸¾ðªº½d¨Ò¦p¦ó­×¥¿

[µo°Ý] ½Ð°Ý°ï¿n±Æ§Ç »¼°j §¹¥þ¤G¤¸¾ðªº½d¨Ò¦p¦ó­×¥¿

¥»©«³Ì«á¥Ñ singo1232001 ©ó 2021-7-27 01:21 ½s¿è

¤p§Ì¥Ø«e¦b¾Çºtºâªk
¦]¬°«D¥»¬ì,³\¦h·§©À­n­«·s¾Ç²ß
¥ý°Ñ¦Ò¤F ¨ä¥L»y¨¥ªº¼gªk§ï¼g¦¨VBA
¥¿¦n½m²ß«Øºc·§©À

¦ý·í¤¤¹J¨ì¤@­Ó°ÝÃD ­pºâ"¸­¤l¸`ÂI¦ì"®É·|¶W¹L°}¦C¤j¤p
°ÝÃD¦b °ï¿n±Æ§Ç»¼°j.Function heapify ¸Ì­±ªºµù¸Ñ¦ì¸m
¥u­n§â³o¥|¦æ
    If c1 > n Or c2 > n Then
    heapify = tree        
    Exit Function           
    End If               
¨ú®ø±¼ ´N·|¥X¿ù

­ì©lªº½d¨Òµ{¦¡¤W ¨Ã¨S¦³»Ý­n¥t¥~«Ø¸m³o¬q,¦¹¬ÛÃöªº°ÝÃDºÊ¬Ý«á(­ì©l½d¨Ò³]6  ²Ä¤T¦¸ »¼°j®É,C1ºâ¨ì7)

¥Ñ©ó¤]¬O­è¶}©l¸ÕµÛ¼g Function ¨S¦h¤[ ,¦³«Ü¦h¤£·|¼gªº¦a¤è

­Y¦³»yªk¤£¹ï ·§©À¿ù»~ ­ì«h¿ù»~ªº³¡¤À ·Ð½Ð°ª¤â­Ì«üÂI¤@¤U

³o¥÷Àɮצp¦ó­×§ï¤ñ¸û²Å¦X­ì©l½d¥»ªº·Qªk©O? (Àɮפº¦³youtubeªº¼v¤ù³sµ²¥i¥H°Ñ¦Ò)

°ï¿n±Æ§Ç °ï±Æ§Ç °ï¾ð §¹¥þ¤G¤¸¾ð.zip (405.39 KB)

¦^´_ 1# singo1232001
¦Û¤v¦^´_¦Û¤v°ÝÃD
§ä¨ì°ÝÃD©Ò¦b
­ì¦]¦b©ó ¦¹ÃDAB¨âªÌ¤§¶¡¦³¬ÛÃö©Ê,¥L·|¥ý¥ÎA§PÂ_B¬O§_²§±`,¦ÓµLªk¤@°_¦P®É if A and B ¤@°_§PÂ_  
¨BÆJ§ï¬° if A =true then :if B=true then xxxx
ÁקKB¥»¨­²§±`
   
¥t¥~ªþ¤WÀɮװѦÒ

°ï¿n±Æ§Ç °ï±Æ§Ç °ï¾ð §¹¥þ¤G¤¸¾ð.zip (802.22 KB)

TOP

¦^´_ 2# singo1232001

·PÁ¤À¨É

'¤@­Ó±q10Åܦ¨1ªº»¼°j(¥x) »¼Âk(³°)¡A§Ú­×§ï¦p¤U

Sub °ò¦»¼°j´ú¸Õ()
    Debug.Print Time
    Debug.Print factorial(10) & "END"
End Sub

Function factorial(n)
    Debug.Print n
    If n > 1 Then factorial = factorial(n - 1)
End Function
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2021-7-28 04:51 ½s¿è

¦^´_ 2# singo1232001

­ì¦]¦b©ó ¦¹ÃDAB¨âªÌ¤§¶¡¦³¬ÛÃö©Ê,¥L·|¥ý¥ÎA§PÂ_B¬O§_²§±`,¦ÓµLªk¤@°_¦P®É if A and B ¤@°_§PÂ_  
¨BÆJ§ï¬° if A =true then :if B=true then xxxx
ÁקKB¥»¨­²§±`

VB6¬O¤ñ¸ûªº»yªkºO~ IF A and B then .....   

µ{¦¡·| A ¸ò B³£ ¥ý§PÂ_¡A¦A¥ÎAndÅÞ¿è­pºâ¡A¤£ºÞ A ¬O True ÁÙ¬O False

VB.Net ´X¥G³£¥Î AndAlso ¤F(­n¥ÎAnd¤]¬O¥i¥H)¡A¥ç§Y«e­±¥ý§PÂ_¡A«e­±­Y¬° False «h¤£©¹«á§PÂ_

µ¥¦P§A©î¨â¦æ¼g~  §A¥i¥H¥Î¥H¤Uµ{¦¡¤À¥X°Ï§O¡A¦bVBA·|¸õ¥X¿ù»~¡A¦bVB.Net ¥ÎAndAlso¤£·|¸õ¿ù»~


µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2021-7-28 05:01 ½s¿è

¦^´_ 2# singo1232001

¬Ý§A¥Î »¼Âk ¼g ¶¥¼h¨ç¼Æ

¨º§Ú¨Ó¦Ò¦Ò§A~ ¦p¦ó¥u¨Ï¥Î1­Ó For °j°é¡A¥B¤£¯à¥Î­¼ªk¹Bºâ¤l "*"

¥u¾a¥[ªk¹Bºâ¤l¡A¼g¥X ¤@­Ó­pºâ¶¥¼hªº¨ç¼Æ

Ex:
¿é¤J°Ñ¼Æ 1,5  ·|¤ÏõX 120 (1*2*3*4*5)  
¿é¤J °Ñ¼Æ2,6  ·|¤ÏõX 720 (2*3*4*5*6)  
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¥»©«³Ì«á¥Ñ singo1232001 ©ó 2021-7-28 10:05 ½s¿è
  1. Function addZ(m, n)
  2. If m = 0 Then Exit Function
  3. If i <= n Then addZ = addZ(m + (-1), n) + n
  4. End Function

  5. Function Mu(m, n)
  6. If n = m Then
  7.     Mu = m
  8. Else
  9.    Mu = addZ(m, Mu(m + 1, n))
  10. End If
  11. End Function
  12. Sub main()
  13. Debug.Print Mu(2, 6)
  14. End Sub
½Æ»s¥N½X
¦^´_ 5# n7822123


³o¹DÃD¥Ø¯u¦n ¦³°÷¨ë¿E

ª½±µ¬ð¯}§Úªºª¼¸z

§Ú¥Ø«e¬O¶Ã¼gªº ·§©À¤WÁÙ¬O¦³°ÝÃD

¸ÑÃD Åý§Ú§ó¥[¼ô±x»¼°jªºª±ªk

ÁÙÀò±o¤F³\¦hªº«ä¸ô ·PÁ·PÁÂ

¥Ø«e§Úªºµª®×¦³¨â­Ó¯ÊÂI 1.§ä¤£¨ì¦a¤è´¡¤J°j°é 2.¥Î¤W¤F¤@­Ó­t¸¹

¬ã¨s¤F¤T­Ó¤p®É¦h °í«ù¤£¤U¥h¤F

¨D¤j¯«¸Ñµª

TOP

¦^´_ 6# singo1232001

§Aªºµª®×¤]¤£¿ù¡A¥Î¤F¨â­Ó»¼Âk~

Function Factorial(A, B) As Long
Dim S&
If A > B Then Factorial = 1: Exit Function
For i = 1 To A
  S = S + Factorial(A + 1, B)
Next i
Factorial = IIf(S = 0, 1, S)
End Function

Sub Test()
MsgBox Factorial(2, 6)
End Sub
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 7# n7822123


    ·PÁ«ü¾É

TOP

        ÀR«ä¦Û¦b : ­n¥Î¤ß¡A¤£­n¾Þ¤ß¡B·Ð¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD