Thursday, 24 January 2013

Power

// Find the power of any number

// programmer: M.Ateek
// class:      BSCS
// symester:   1st
// Roll #      03


#include <iostream>
using namespace std;
int main()
{
int number,power,count,i;

cout << "Enter Number: "; cin >> number;
cout << "Enter the power: "; cin >> power;

count = 1;
for (i=1; i <=power; i++)
count = count*number;

cout << count << endl;

cin.get();
return 0;
}

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Enterprise Project Management