Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Sedo - Buy and Sell Domain Names and Websites project info: programmershelp.co.uk Statistics for project programmershelp.co.uk etracker® web controlling instead of log file analysis

   Misc

   Amazon

   Links

    


Cos function example
 

 

 

Description

This shows a couple of examples of the cos() function . This returns the cosine of an angle in radians . The range returned is -1.0 to 1.0 .

Code

#include <stdio.h>
#include <math.h>

int main()
{

printf("The cosine of %f is %f.\n",0.5,cos(0.5));
printf("The cosine of %f is %f.\n",1.0,cos(1.0));
printf("The cosine of %f is %f.\n",-1.0,cos(-1.0));
return 0;
}

Information

tested using LCC Win 32

 

 

 

 

 

Download

cos.txt


 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
strip html tags from some text(php)
fire routine(Assembly)
Populate a combo box(ASP)
delete files on a floppy disk(VB)
Odd or even(C)
Close window link(Javascript)
free disk space using WMI(VBScript)
gethostbyaddr function(PHP)

    




Copyright © 2003 by programmershelp.co.uk