[CENTER]السلام عليكم
كيف الحال ؟
من الدوال
math library function
الدالة tan(X) : o
لو سمحتوا ابغى برنامج يحتوي على الدالة tan
بلغة الـ c++
لو برنامج بسيط جدا
فقط يوضح طريقة عمل الدالة
ضروري ضروري جدا جدا
مهــــــــــــــــــــــــــــــــــــم
ومشكورين [/center]
[LEFT]
double tan ( double x );
float tan ( float x );
long double tan ( long double x );
Compute tangent
Returns the tangent of an angle of x radians[/left]
Parameters
x
[LEFT]Floating point value representing an angle expressed in radians
Return Value
Tangent of x
Portability
In C, only the double version of this function exists with this name
Example
/* tan example */
#include <stdio.h>
#include <math.h>
#define PI 3.14159265
int main ()
{
double param, result;
param = 45.0;
result = tan (param*PI/180);
printf ("The tangent of %lf degrees is %lf.
", param, result );
return 0;
}
Output
The tangent of 45.000000 degrees is 1.000000[/left]
[RIGHT]*لا تنسي تحويل printf في c الي cout في c++
*تحويل <studio.h> الي <iostream.h> او الي <iostream >
مع using namespace std
ياريت اكون افادتك
[/right]
hendokasha
ألف ألف شكر عزيزتي
مشكورة وجزاك الله ألف خير