|
| 23 Jul 2012 11:24 AM |
#include <stdio.h> #include <math.h> #include <stdlib.h>
void Display (double Angle);
int main () { Display (.08 * (double)(rand() % 100) - 4.0); Display (.08 * (double)(rand() % 100) - 4.0); Display (.08 * (double)(rand() % 100) - 4.0); return 0; }
void Display (double Angle) { printf ("The sine of %f radians is %f\n", Angle, sin (Angle)); printf ("The cosine of %f radians is %f\n", Angle, cos (Angle)); printf ("The tangent of %f radians is %f\n\n", Angle, tan (Angle)); }
Take out your compilers :)
Peace and Humble. |
|
|
| Report Abuse |
|
|
Aaaboy97
|
  |
| Joined: 05 Apr 2009 |
| Total Posts: 6612 |
|
|
| 23 Jul 2012 11:28 AM |
or in Lua:
local angle = 0 print("sine of " .. angle .. " = " .. math.sin(angle)) print("cosine of " .. angle .. " = " .. math.cos(angle)) print("tangent of" .. angle .. " = " .. math.tan(angle))
It's not really worth making a whole thread about, it's basic programming. |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2012 11:30 AM |
Thats right still. i got bored thats why.
Peace and Humble. |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2012 11:33 AM |
| And exact;y how long did this unbore you? |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2012 11:34 AM |
Nothing much only 20 secs.
Peace and Humble. |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2012 11:37 AM |
| A very effective waste of your time then. |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2012 11:40 AM |
Yeah yeah i need to pass time. anyways i need some help at vb.net in making a executable from 2 codes in a interval of time.
Peace and Humble. |
|
|
| Report Abuse |
|
|
Garnished
|
  |
| Joined: 09 Apr 2012 |
| Total Posts: 12695 |
|
|
| 23 Jul 2012 01:12 PM |
You just lost 20sec. of your life, regain it with candy.
|
|
|
| Report Abuse |
|
|
|
| 23 Jul 2012 01:20 PM |
| Because you can really use this in an exam. ;) |
|
|
| Report Abuse |
|
|