How to Make a Sphere Volume Calculator With Command Prompt
by WaterLemon7 in Circuits > Computers
2209 Views, 2 Favorites, 0 Comments
How to Make a Sphere Volume Calculator With Command Prompt
hello guys in this instructable i will be giving you the codes to make a sphere volume calculator! feel free to change it around but please dont re-publish and if you mention in your instrucable plz give me credit.
The Codes!
to make it just copy and paste these codes into notepad and save it as a .bat file
@echo off
title Sphere Volume Finder
color 0f
echo.
echo ____________________________________
echo.
echo Welcome To The Sphere Volume Finder!
echo First Choose The Colour You Want.
echo ____________________________________
echo.
pause
cls
color 0f
echo.
echo.
echo ___________________________________________________________________
echo.
echo Colour Changer, Type In The Colour Code You Want Then Press Enter.
echo.
echo ___________________________________________________________________
echo.
echo.
echo Colour Codes Are:
echo 0=black 8=gray
echo 1=blue 9=light blue
echo 2=green A=light green
echo 3=aqua B=light aqua
echo 4=red C=light red
echo 5=violet D=light violet
echo 6=yellow E=light yellow
echo 7=white F=bright white
echo.
set /p code=Colour Code:
color %code%
cls
goto top
:top
echo.
echo.
echo ___________________________________________________________________
echo To Use Type In The Radius Of Your Sphere And Press Enter, Simple.
echo However Because cmd Does Not Pick Up Decimals Just Put The
echo Decimal Point To Digits From The End Of The volume Given.
echo Note: Radius's Higher Than 1000 Give The Wrong Answer,
echo and Answers Are Not Exact Because Pi Is Rounded To
echo 2 Decimal Places,(This May Make A Big Difference In Big Numbers).
echo ___________________________________________________________________
echo.
set /p ans=Radius:
if %ans%==hello echo Why Hello To You Polite Person!
set /a cbe=%ans%*%ans%*%ans%
set /a area=%cbe%*314*4/3
echo Volume= %area%
pause
cls
echo Previous Volume: %area%
goto top
@echo off
title Sphere Volume Finder
color 0f
echo.
echo ____________________________________
echo.
echo Welcome To The Sphere Volume Finder!
echo First Choose The Colour You Want.
echo ____________________________________
echo.
pause
cls
color 0f
echo.
echo.
echo ___________________________________________________________________
echo.
echo Colour Changer, Type In The Colour Code You Want Then Press Enter.
echo.
echo ___________________________________________________________________
echo.
echo.
echo Colour Codes Are:
echo 0=black 8=gray
echo 1=blue 9=light blue
echo 2=green A=light green
echo 3=aqua B=light aqua
echo 4=red C=light red
echo 5=violet D=light violet
echo 6=yellow E=light yellow
echo 7=white F=bright white
echo.
set /p code=Colour Code:
color %code%
cls
goto top
:top
echo.
echo.
echo ___________________________________________________________________
echo To Use Type In The Radius Of Your Sphere And Press Enter, Simple.
echo However Because cmd Does Not Pick Up Decimals Just Put The
echo Decimal Point To Digits From The End Of The volume Given.
echo Note: Radius's Higher Than 1000 Give The Wrong Answer,
echo and Answers Are Not Exact Because Pi Is Rounded To
echo 2 Decimal Places,(This May Make A Big Difference In Big Numbers).
echo ___________________________________________________________________
echo.
set /p ans=Radius:
if %ans%==hello echo Why Hello To You Polite Person!
set /a cbe=%ans%*%ans%*%ans%
set /a area=%cbe%*314*4/3
echo Volume= %area%
pause
cls
echo Previous Volume: %area%
goto top
All Done!
All done! if you find any problems just leave a comment and ill see what i can do to fix it. hope you have fun and this helps you a lot