# include <conio.h>
# include <iostream.h>
# include <math.h>
main()
{
int der,FN,LN,I;
float rad,s,c,t;
clrscr();
cout <<"\n******************************************";
cout <<"\n* TRIGONOMETRY ANGEL NUMBERING PROGRAM *";
cout <<"\n******************************************";
cout <<"\n\n";
cout <<"Enter first number ! = "; cin >>FN;
cout <<"Enter last number ! = "; cin >>LN;
cout <<"Enter interval ! = "; cin >>I;
cout <<"\n\n";
cout <<"\n=================================================";
cout <<"\n|DERAJAT| RADIAN | SINUS | COSINUS | TANGEN |";
cout <<"\n=================================================";
if(LN<FN)
{
cout <<"\n\t~~~~~~~~~~~~EEEEERRRROOOORRRRR~~~~~~~~~~~~";
cout <<"\nYour false entering first number or last number";
}
else
{
for(der=FN;der<=LN;der=der+I)
{
rad=1;
rad=M_PI/180*der;
s=sin(rad);
c=cos(rad);
t=tan(rad);
cout <<"\n| "<<der<<" | "<<rad<<" | " <<s<< " | " <<c<< " | " <<t<< " |";
cout <<"\n===================================================";
}
}
cout <<"\n\n\n";
cout <<"\t~~~~~~~~~~~~THANK YOU~~~~~~~~~~~~";
getch();
}
Search
Categories
- Part I : Perkenalan (4)
- Part II : Operator (3)
- Part III : Percabangan (materi) (2)
- Part III : Percabangan (program) (4)
- Part IV : Perulangan (meteri) (3)
- Part IV : Perulangan (program) (3)
- Part V : Array (materi) (1)
- Part V : Array (program) (2)
- Penerapan (6)
- Pointer (2)
- Searching (pencarian) (3)
- Typedef (1)