fork download
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <math.h>
  4. using namespace std;
  5.  
  6. int main(int argc, char *argv[])
  7. {
  8.  
  9. double w,A,x,y,Z,sigma;
  10. x = atof(argv[1]); // Between -1:1
  11. y = atof(argv[2]); // Between -1:1
  12. w = atof(argv[3]); // Between 1:100
  13. A = atof(argv[4]); // Between 0:20
  14. sigma = atof(argv[5]); // Between 0:1
  15.  
  16. Z = A * sin((pow(x,2) + pow(y,2))*w) * cos((pow(x,2) + pow(y,2))*w);
  17. Z = Z * exp(-(pow(x,2) + pow(y,2))/sigma);
  18. cout << Z << ", ";
  19.  
  20. return 0;
  21. }
  22.  
Runtime error #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Standard output is empty