best wishes to GEEKDUDE!
there are a lot of message boxes to help, also it needs a lot of polishing but it delivers what it intends!
thanks ahk again!
InputBox, UserInput, CONVERTING DECIMAL PART IN FRACTION, ENTER ONLY THE PART AFTER DECIMAL, , 320, 120 userinput1 := UserInput index = 1 K := Userinput / 10 ;msgbox k is %K% ;msgbox index is %index% loop { if k < %index% { ;msgbox %a_index% digit number q := a_index ;msgbox %q% goto, label return } else { index := index * 10 ;msgbox %index% } } label: r := 10**q msgbox the numerator is %r% userinput2 := r ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;NUMERATOR FOUND, NOW SOLVING THE GCD PART;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; label2: S := Mod(r, Userinput) msgbox, %r% / %userinput% remainder is %S% if S != 0 { r := Userinput Userinput := S msgbox, %r% / %Userinput% goto, label2 } if S = 0 msgbox, the gcd is %userinput% numerator := userinput1 / userinput denominator := userinput2 / userinput msgbox, %numerator% / %denominator% finalN := Floor(Numerator) finalD := Floor(denominator) msgbox, FINAL ANSWER is %finalN%/%finalD%
o7 AHK!