#include<stdio.h>
#include<math.h>
#include<conio.h>
float f(float x);
float power(float x,int i);
float m[10];
int n;
main()
{
clrscr();
float a,b,e,c,x,temp;
int i;
printf("input power of maeadeleh\n");
scanf("%d",&n);
for (i=n;i>=0;i--)
{
printf("zarayeb\n");
scanf("%f",&m);
}
float t=0;
t=t+0.83+0.0064;
printf("a,b\n");
scanf("%f,%f",&a,&b);
printf("e\n");
scanf("%f",&e);
do
{
c=a-((b-a)/f(b)-f(a))*f(a);
if(f(c)<0)
temp=-1*f(c);
else
temp=f(c);
if(temp<e)
if (f(c)*f(a)>=0 )
a=c;
else
b=c; }while(temp>e);
printf("resheh=\n%f",c+t);
getch();
}
float pow1(float x,int i)
{
int m;
float power=1;
for(m=i;m>=0;m--)
power=power*x;
return power;
}
float f(float x)
{
float j=0;
int i;
for (i=n;i>=0;i--)
j=m*pow1(x,i)+j;
return j;
}
void CMy3Dlg::OnRunpgm()
{
// TODO: Add your control notification handler code here
UpdateData(true);
CString strPgmName;
strPgmName=m_strProgToRun;
strPgmName.MakeUpper();
if (strPgmName == "Paint")
WinExec("MSpaint.exe",SW_SHOW);
if (strPgmName=="Notepad")
WinExec("Notepad.exe",SW_SHOW);
if (strPgmName=="Calculator")
WinExec("Calc.exe",SW_SHOW);
}
[LTR]#include <iostream.h>
void main(){
int ,*data,num,i;
cout << " Enter The Number Of Nums Do You Want To Put\n";
cin >> num;
data = new int [num];
for ( i=1 ; i<=num ; i++){
cout << " Please Enter The " << i << "TH Number \n";
cin >> data[i];
[/LTR]}
#include<conio.h>
#include<stdio.h>
void main(){
int n,m=1,digit;
while(1){
printf("please Enter One number:")
scanf("%d,&n);
do{
digit=n%10;
n/=10;
m=m*10+digit;
}while (n!=0);
printf("reverse is %d",m);
} //end while
getch()}