Private sub commandementclick ()
Command1.caption = "Please wait for the calculation result"
Stmer = Timer
Text3.text = POW (text1.text, text2.text)
Text4.text = timer-stmer & "seconds"
If text6.text = "" then
Text6.text = inputbox ("Enter the number you want to divide", "Remove the remainder of an integer from a large number ")
End if
Text7.text = modmax (text3.text, Val (text6.text ))
Text5.text = Len (TRIM (text3.text ))
Command1.caption = "computing completed"
End sub
Function POW (byval X as string, byval y as string) as string
Dim le1 as long, le as long, same as string, CH2 as string, CH3 as string
Dim w as long, fistshu as integer, secondshu as integer, N as integer, t as integer, M as integer
Bytes = x
Le1 = Len (X)
CH2 = ""
For I = 2 to Val (y)
For J = le1 to 1 step-1
N = le1-J
M = Val (mid (x, J, 1 ))
Secondshu = 0
Le2 = Len (rows)
While le2
T = Val (mid (values, le2, 1 ))
W = m * t
If n = 0 or Len (CH2)-N = 0 then
Firstshu = W mod 10 + secondshu
Else
Firstshu = W mod 10 + secondshu + val (mid (CH2, Len (CH2)-N, 1 ))
End if
Secondshu = W/10
If firstshu> = 10 then
Secondshu = secondshu + firstshu/10
Firstshu = firstshu mod 10
End if
If n = 0 or Len (CH2)-N = 0 then
CH2 = firstshu & trim (CH2)
Else: Mid (CH2, Len (CH2)-N, 1) = firstshu
N = n + 1
End if
Le2 = le2-1
Wend
Next J
If secondshu <> 0 then
Second = secondshu & CH2
Else: shard = CH2
End if
CH2 = ""
Next I
Pow = Signature
End Function
'Here is the remainder.
Function modmax (byval X as string, byval y as string)
Dim wshu as integer, le1 as integer
If y = 0 then
Exit Function
End if
Wshu = Len (TRIM (x ))
For I = 1 to wshu
Q = Val (P & Mid (TRIM (x), I, 1 ))
P = Q mod y
Next I
Modmax = P
End Function