Initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
Multiply a number by a power
|
||||
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user