Pages

Write A Program To Find The Power Of Number

Wednesday, 17 July 2013

#include<stdio.h>
#include<conio.h>
 main()

{
  int p,n,l=1;
 int s=1;

  printf("\nEnter number = ");
  scanf("%d",&n);

  printf("\nEnter  power =");
  scanf("%d",&p);

  while(l<=p)
  {
      s=s*n;
      l++;
  }

  printf("\n%d  raise to power %d is= %ld",n,p,s);
  getche();
}

 

Search Box

Most Reading

Contact Form

Name

Email *

Message *