www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/02/04/15:36:00

Message-ID: <00bc01c08ee9$35ce2380$1bfcfea9@laptop366mhz>
From: "mike friedrichs" <mike_fr1 AT txucom DOT net>
To: <djgpp AT delorie DOT com>
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
Subject: Re: exponment
Date: Sun, 4 Feb 2001 14:29:41 -0600
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Reply-To: djgpp AT delorie DOT com

Drake,

     let z = x^y
  log(z) = y * log(x)
        z   = exp(y * log(x))

mike friedrichs


"Drake matthews" <cyberdrake AT icrazy DOT com> wrote in message
news:Dbif6.155$dB3 DOT 33715 AT sapphire DOT mtt DOT net...
> #include <iostream.h>
> #include <conio.h>
>
>
> int main()
> {
>   clrscr ();
>
> int  intpow;
> int x, int y;
>
>
>
>   cout << "This program will compute any base value raised to an exponent
> value" << endl;
>
>   cout << "Enter a base value:" << endl;
>   cin >> x;
> cout >> "Enter an exponment value:" << endl;
> cin >> y;
> intpow=exp((log(y)*x);
>  { if (y == 0) return 1; return x * intpow (x, y - 1); }
>
>
> I'm have trouble writing this program could someone help me.
>
>
>



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019