Skip to main content

Finding The Power Of The Given No

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,b,p,pow=1;
printf("enter the b and power values");
scanf("%d,%d",&b,&p);
for(i=1;i<=p;i++)
{
pow=pow*b;
}
printf("pow is %d",pow);
getch();
}

Comments

Popular posts from this blog

C++ Program Finding The Absolute Value

#include<iostream> using namespace std; int main() { cout<<" enter any number"; cin>>num; if(num>0) { cout<<"The absolute value of number is:"<< num; } else { cout<<"The absolute value of number is :"<< -(num); } return 0; } OUTPUT Enter Any number: 2 The absolute value of number is 2