Filename | The rank real numbers |
Permission | rw-r--r-- |
Author | pramana |
Date and Time | 12:34 am |
Label | Alpro cases |
Action |
This is the source code of the program the rank a real number
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
float pangkat;
int a;
float x;
int y;
cout<<"Calculate the rank of real number"<<endl<<endl;
cout <<"input limit value = ";
cin >> x;
cout <<"input rank value = ";
cin >> y;
pangkat =1;
a =1;
while (!(a>y))
{
pangkat =pangkat*x;
a =a+1;
}
cout << "the result is : "<<pangkat << endl;
system("PAUSE");
return EXIT_SUCCESS;
}
0 comments:
Post a Comment