B
Bill Cunningham
I keep trying to compile this code and I don't see anything wrong. The
compiler complains about a syntax error involving z. There is more than one
z on the line in question and I am out of ideas.
/*oscillator*/
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
if (argc != 3) {
puts("os usage error");
exit(1);
}
double z = 0;
double x = strtod(argv[1], NULL);
double y = strtod(argv[2], NULL);
printf("%.2f\n", ((z = (x - y)) z * 100) / x);
return 0;
}
What's wrong?
Bill
compiler complains about a syntax error involving z. There is more than one
z on the line in question and I am out of ideas.
/*oscillator*/
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
if (argc != 3) {
puts("os usage error");
exit(1);
}
double z = 0;
double x = strtod(argv[1], NULL);
double y = strtod(argv[2], NULL);
printf("%.2f\n", ((z = (x - y)) z * 100) / x);
return 0;
}
What's wrong?
Bill