Filename | The Rank of Function ln and exp |
Permission | rw-r--r-- |
Author | pramana |
Date and Time | 10:33 am |
Label | Alpro cases |
Action |
This time i'll give a program about The rank but this is different of before. Because this the rank used the
function ln and exp....
Look the character of Logarithm
ln(x rank y)=y*ln(x)
exp(ln(x rank y))=exp(y*ln(x))
x rank y=exp(y*ln(x))
This is source code of The rank of function ln and exp
#include<iostream.h>
#include<math.h>
float rank(int x,int y)
{ return (exp(y*log(x))); }
main(){
float result;
int m,n;
cout<<"input number : ";
cin>>m;
cout<<endl<<"input number for rank : ";
cin>>n;
result = rank(m,n);
cout<<m<<" rank "<<n<<" = "<<rank<<endl<<endl;
getch();
}
I HOPE THIS CAN HELP U ^_^
0 comments:
Post a Comment