Last active
April 13, 2020 14:59
-
-
Save parzibyte/e05d53470df8dbfa27c822be73f74b19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char *ecuacion = "x * y * z * pow(x, y)"; | |
// Es importante usar el tipo double, y no float | |
double x, y, z; | |
/* | |
Juntamos las variables del programa con las de la expresión. Nota | |
que son punteros, así, podemos modificar las variables más tarde pero | |
la expresión ya estará compilada | |
*/ | |
te_variable variables[] = { | |
{"x", &x}, | |
{"y", &y}, | |
{"z", &z}, | |
}; | |
int numeroVariables = | |
3; // Esto se define manualmente; es la cantidad de variables |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment