graph1 in Java


public static void graph1() {

double d; long s; long h; double c; long lim; double x; double y; long i; long n; { d = 0.0625; s = 32; h = 34; c = 6.28318; lim = 32; x = 0.0; y = 0.0; i = 0; n = 0; for (i = 0; i < lim + 1; i++) { x = d * i; y = Math.exp((- x)) * Math.sin(c * x); n = Math.round(s * y) + h; while (n > 0) { System.out.print(" "); n = n - 1; }; System.out.print("*"); System.out.println(); }; }} // graph1

Contents    Page-10    Prev    Next    Page+10    Index