كود PHP:
#include<iostream.h>
#include<cmath.h> // i do not know
int main(){
title: cout<< " ********Trigonometry program******** \n "<<endl;
cout<<"Please enter an angle value => \n"<<endl;
float x;// because float x common than int x
cin>>x;
cout<<"Is the anglein Degree or Radian? \n"<<endl;
cout<<"Type D it is in degree \n";
cout<<"Type R it is in degree \n";
cout<<"your response => \n"<<endl;
switch(x){
case D:
y=(3.14 * x)/180;
cout<< x t <<"degree \t"<< "= \t"<< y t << "radian \t";
break;
case R:
y=(180 * x)/3.14;
cout<< x t <<"radian \t"<< "= \t"<< y t << "degree \t";
break;
} // switch
cout<<"Result \n"<< endl;
coue<<"==================================== \n"<<endl;
cout<<"x = \t"<< x n <<endl;
cout<< "sin(x)= \t"<< sin(x) << endl;
cout<< "cos(x)= \t"<< cos(x) << endl;
cout<< "tan(x)= \t"<< tan(x) << endl;
cout<<"==================================== \n"<<endl;
cout<<"Do you want to continue? \n";<<endl;
cout<<"Type y to continue \n"<< endl;
cout<<"Type any other key to stop \n"<< endl;
char c;
if(c==y)
goto title;
else{
cout<<"Thank you , good bye!! \n"<<endl;
break;
} // else
return 0;
} //main
بالنسبه اخوي للمكتبه فأنا مو متأكده منها و اذا لم يتعرف على الدوال فيجب عليك البحث عن اسم المكتبه الصحيح حتى يتعرف على دوال حساب المثلث ..
و بالنسبه لتحويل هذا البرنامج إلى برنامج تنفيذي فيجب عليك الرجوع او لمواقع تفيدك في تكوين واجهات ثم تحويلها لبرنامج تنفيذي..
وما بقي عليك أخوي سوى تجريب البرنامج و تصحيح الأخطاء و ان شاء الله انها أخطاء بسيطه مسافات أو شيء من ذلك لأني تعبت في البحث عن البرنامج ولا جدوى ..
و الله يقويك اهم شيء انك تحاول تطلع و تجرب حتى تعرف أكثر ..
نشوفكم على خير ..
كيفة تحويل أي برنامج بأي لغة إلى برنامج تنفيذي بصراحه مو مجربه إلا للغة الماتلاب لأن البرنامج عندي بس انت حاول تجرب على برنامجك ان شاء الله يضبط
Steps of convert .m file in MATLAB to .exe(standalone applications)
you must have MATLAB Compiler installed on your machine and configured properly on your system. At a minimum, you must run the following command once after installing a new version of MATLAB Compiler:
>>mbuild –setup
4-8 How to setup the MATLAB Compiler?
1- At the command prompt type the following command mbuild –setup .
2- MATLAB will respond with:
Would you like mbuild to locate installed compilers [y/n]?
3- Choose y .
4- MATLAB will display a list of choices :
Select a compiler:
[1] Lcc-win32 C 2.4.1 in C:PROGRA~1MATLABR2007asyslcc .
[2] Microsoft Visual C++ 6.0 in C:Program FilesMicrosoft Visual Studio.
[0]None.
5- Select the first choice [1] by entering “1” (Note: If you have Microsoft Visual C++ 6.0 installed on your machine, you can use Microsoft Visual C++ 6.0 as your compiler).
Compiler:
- Then, you will receive the last message:
Please verify your choices:
Compiler: Lcc-win32 C 2.4.1 .
Location: C:PROGRA~1MATLABR2007asyslcc.
Are these correct?([y]/n):
You should type “y” (without quotations).
6-write in command prompt mcc –mv filename