#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,i,temp=1;
clrscr();
cout<<"Enter number for operation";
cin>>a>>b;
for(i=1;i<=b;i++)
{
temp=temp*a;
}
cout<<endl<<"Result are:: "<<temp;
getch();
}
Not Satisfied ? Just search & get the result
Related posts:
- C program to read two integers M and N and to swap their values. Use a user-defined function for swapping. Output the values of M and N before and after swapping with suitable messages
- How to monitor switch activity and its performance with LED Light
- C program to find the value of sin(x) using the series up to the given accuracy (without using user defined function) Also print sin(x) using library function.
- C program to find the value of cos(x) using the series up to the given accuracy (without using user defined function) Also print cos(x) using library function.
- C++ program – calculate the factorial of a number using recursion.
