Im trying to create a small program where it asks for a number (radius) and then calculates the area of a circle. BUT when I square the input and multiply it by pi, i get a whole number. I need it in decimal. Could someone explain? Thanks.
TITLE Area of Circle (main.asm) ; Find Area of Circle: Area = pi * r2 ; ; Revision date: INCLUDE Irvine32.inc .data myMessage BYTE "Enter radius: ",0dh,0ah,0 pi DWORD 3.14 .code main PROC mov edx, OFFSET myMessage ; ask user for input call WriteString call Readdec imul eax, eax imul eax, pi call Writedec call Crlf exit main ENDP END main