Wednesday, May 2, 2012

Program Mencari Nilai Cosinus (COS) dengan math.h di C++

#include<math.h>
#include <conio.h>
void main(){
clrscr();
int a;
const float phi =3.14159265;
float hasil;
cout<<"masukan a: "; cin>>a;
hasil = cos (a*phi/180);
cout<<"hasilnya= "<<hasil<<endl;
getch();
}

1 comment:

  1. boleh tau ini pake program apa yach??? boerland atow VC ++

    ReplyDelete

Mohon maaf untuk komentar yang masuk harus terlebih dahulu melalui moderasi untuk menghindari adanya hal-hal yang tidak diinginkan dan juga SPAM..