Show trigonometry table

script to display trigonometric table. just a simple one which echo given data , that's all.

Trigonometry (from Greek trigonon "triangle" + metron "measure") is a branch of mathematics that studies triangles and the relationships between their sides and the angles between these sides. Trigonometry defines the trigonometric functions, which describe those relationships and have applicability to cyclical phenomena, such as waves. The field evolved during the third century BC as a branch of geometry used extensively for astronomical studies. It is also the foundation of the practical art of surveying.
                                                                      Wikipedia ( http://en.wikipedia.org/wiki/Trigonometry )




-------------------------------------------------------------------------------------------------------------------------------------------------
HOW THIS SCRIPT WORKS:
Absolutely nothing to explain here!
Just 'echo'ing with necessary colour changes.
-------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

#!/bin/bash

# for displaying trignometry table


echo -e "\n\e[1;31m  A       0˚   30˚    45˚    60˚    90˚\n"
echo -e "\e[1;34m sin A\e[1;30m     0   1/2    1/2   3/2    1\n"
echo -e "\e[1;34m cos A\e[1;30m     1   3/2   1/2    1/2    0\n"
echo -e "\e[1;34m tan A\e[1;30m     0   1/3    1      3     ∝\n"
echo -e "\e[1;34mcosec A\e[1;30m       2     2     2/3    1\n"
echo -e "\e[1;34m sec A\e[1;30m     1   2/3   2      2      ∝\n"
echo -e "\e[1;34m cot A\e[1;30m        3     1     1/3    0\n\e[0m\n


-------------------------------------------------------------------------------------------



    




Enjoy Linux !!


Don't know what to do with codes ?? click here 

No comments:

Post a Comment