okay so lets say i had the radius of a circle, im trying to find the area.
The area of a circle can be found by multiplying pi ( n = 3.14) by the square of the radius
If a circle has a radius of 4, its area is 3.14*4*4=50.24
If you know the diameter, the radius is 1/2 as large.
tried this hunk of junk
@echo off
set /p "RESULTA=Enter radius : "
set /a "RESULTB = 3.14 * %RESULTA% * %RESULTA%"
echo Your result is "%RESULTB%".
pause
But i cant use decimals in batch so i made a work around
314 divided by 100 times RESULTA also gives you the area,
but it's not rounded.
@echo off
set /p "RESULTA=Enter radius : "
set /a "RESULTB = 314 / 100 * %RESULTA% * %RESULTA%"
echo Your result is "%RESULTB%".
pause
last thing i need to do is round RESULTB, how can i do this in a batch file, i know its possible i just dont know how.