Table of Contents

**Power of a number program in CPlusPlus (C++, CPP) and C with the flowchart**

In this tutorial, we will learn about the followings;

- Flowchart of a program of the power of a number
- Power of a number program in CPlusPlus (C++, CPP)
- Power of a number program in C

**Flowchart of a program of the power of a number**

Coming Soon.

**Power of a number program in CPlusPlus (C++, CPP) **

#include <iostream> #include <conio.h> using namespace std; int main() { int base; int power; int x,result=1; cout<<"Enter base: "; cin>>base; cout<<"Enter power: "; cin>>power; for(x=power;x>0;x--) { result=result*base; } cout<<"Result of power is: "<<result; getch(); }

**Output**

**Power of a number program in C**

#include <stdio.h> int main() { int base; int power; int x,result=1; printf("Enter base: "); scanf("%d", &base); printf("Enter power: "); scanf("%d", &power); for(x=power;x>0;x--) { result= result*base; } printf("Result of Power is: %d", result); return 0; }

**Output**

**Figure:** Power of a number program in CPlusPlus (C++, CPP) and C with the flowchart.