A Program That Read Two numbers (a,b) & Display ab (a to the power b).

#include<stdio.h>
#include<conio.h>
#include<iostream.h>

void main()
{
    int a,b;
    clrscr();
    cout<<"Enter 1st number, a = ";
    cin>>a;
    cout<<"Enter 2nd number,b = ";
    cin>>b;
   
    long int p=1;
    for(int i=1;i<=b;i++)
       p=p*a;

    cout<<a<<" to the power "<<b<<" = "<<p;

    getch();
}

///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........