graph1 in C++
void graph1() {
float d; int s; int h; float c;
int lim; float x; float y; int i;
int 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 = exp((- x)) * sin(c * x);
n = round(s * y) + h;
while (n > 0)
{
cout << " ";
n = n - 1;
};
cout << "*";
cout << "\n";
};
}} // graph1
Contents    Page-10    Prev    Next    Page+10    Index