I am using Windows 7 and I have the following:
set /p param=Please type a number
set /a answer= %param%/2
echo Your answer is %answer%
So anything they type in as a number gets divided by 2. However if it is an odd number, it just rounds it down to the whole number. For example if I typed in 7
it will give me 6
because 7/2 is 3.5 right? But it just rounds it down to the whole number instead of leaving a decimal or in this case a 3.5
. Is there a way I can make it display it? Thanks