Task: Calculate a math problem with an independent variable entered by the user, in c++;
The problem I'm having is how to use the variable part, so if the equation was (2^K)/(20*K), what is the best way to set up :
So far Im on the lines of;
Obviously the equation isn't correct, just a simplified example.***Code:
#include <stdio.h>
#include <math.h>
int main
{
double math, PI, x, K;
printf("Enter a vlaue for variable K: ");
PI = (2^K)/(20*k)
................
Thanks.