below is a sample code from C + + programming:
==============================
#include<iostream.h>
#include<conio.h>
#include<math.h>
double tangen (double a)
{
double t;
t=tan(a);
return(t);
}
double sudut(double a)
{
double s;
s=a/180*3.14;
return(s);
}
main()
{
double a,b;
cout<<"distance value : ";cin>>a;
cout<<"input angle value: ";cin>>b;
cout<<"so the result is: ";endl;
cout<<(a*tangen (angle (b)));
getch();
}
==============================#include<conio.h>
#include<math.h>
double tangen (double a)
{
double t;
t=tan(a);
return(t);
}
double sudut(double a)
{
double s;
s=a/180*3.14;
return(s);
}
main()
{
double a,b;
cout<<"distance value : ";cin>>a;
cout<<"input angle value: ";cin>>b;
cout<<"so the result is: ";endl;
cout<<(a*tangen (angle (b)));
getch();
}
if you want to ask about anything else, please leave a comment. thanks
0 comments
Post a Comment