clanguage07@gmail.com

clanguage07@gmail.com

Saturday, June 16, 2012

#include<stdio.h>
#include<conio.h>
double iteration_power(double,int);
void main()
{
    int n;
    double x,res;
    clrscr();
    printf("\n\t Enter x=");
    scanf("\n\t %lf",&x);
    printf("\n\t Enter n=");
    scanf("%d",&n);
    res=iteration_power(x,n);
    printf("\n\t %lf power%d=%lf",x,n,res);
    getch();
}
double iteration_power(double x, int n)
{
    int i;
    double p=1;
    for(i=1;i<=n;i++)
    p=p*x;
    return(p);
}

No comments:

Post a Comment

GET MORE INFORMATION

http://ads.qadservice.com/t?id=c2168e05-8974-4816-872a-91936ff7379d&size=1024x768&drct=true