Program in C to find out power of any number

Write a program in C to find out power of any number

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

void main ()
{
          double no,r,res;
          clrscr ();
          printf ("Enter Number : ");
          scanf ("%lf",&no);
          printf ("Enter raised : ");
          scanf ("%lf",&r);
          res=pow(no,r);
          printf ("\nResult is %.2lf", res);
          getch ();
}


Post a Comment