Advertisement

C Programming


C programming
Writing power equation (x to the power n)
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{       clrscr();
                int x,n,y;
                printf("Enter x,then n=");
                scanf("%d %d",&x ,&n);

                 y=pow(x,n);
                printf("%d",y);

                getch();
                                }

No comments:

Post a Comment

Please comment bellow. Share your knowledge