101
{ USER }
posts: 55
last: 09-Apr-2008
TITLE: Multiply a integer number by a power
DESCRIPTION: Multiply a number by a power
Submitted: 09-Apr-2008 08:14:04 ( 38w 5d 19h ago ) Language: C++ (*.cpp *.h)
Views: 92 Lines of Code: 25 LINES
Rating:
rate: star1
star2
star3
star4
star5
dstar1
dstar2
dstar3
dstar4
dstar5  ( rated! )
  { 0.00 / 5 }
Difficulty: Intermediate
Bookmark
/* Author: 101
   Date: 09-04-2008
   Filename: Multiply a number by a power
   Description: 
   History: 
*/


#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; 

return 0; 
}