<!--- This snippet shows how to use Cos --->

<HTML>

<HEAD>
<TITLE>
Cos Example
</TITLE>
</HEAD>

<BASEFONT FACE="Arial, Helvetica" SIZE=2>
<BODY  bgcolor="#FFFFD5">

<H3>Cos Example</H3>

<!--- output its Cos value --->
<CFIF IsDefined("form.CosNum")>

	<CFIF IsNumeric(form.CosNum)>
		Cos(<CFOUTPUT>#form.CosNum#</CFOUTPUT>) = <CFOUTPUT>#Cos(form.cosNum)# radians = #Evaluate(Cos(form.cosNum) * 180/PI())# Degrees</CFOUTPUT>
	<CFELSE>
<!--- if it is empty, output an error message --->
		<H4>Please enter a number between -1 and 1</H4>
	</CFIF>
</CFIF>



<FORM ACTION="cos.cfm" METHOD="POST">
<P>Type in a number to get its cosine in Radians and Degrees
<BR><INPUT TYPE="Text" NAME="cosNum" SIZE="25">

<P><INPUT TYPE="Submit" NAME=""> <INPUT TYPE="RESET">

</FORM>

</BODY>

</HTML>       
     
