

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


const double Incr = .1; void PlotSin(double start, double stop) { double centerY = GetWindowHeight()/2.0; MovePen(start, centerY + sin(start)); for (double x = start; x <= stop; x += Incr) LineTo(x, centerY + sin(x)); } void PlotSqrt(double start, double stop) { double centerY = GetWindowHeight()/2.0; MovePen(start, centerY + sqrt(start)); for (double x = start; x <= stop; x += Incr) LineTo(x, centerY + sqrt(x)); }
void Plot(double start, double stop, double (fn)(double)) { double centerY = GetWindowHeight()/2.0; MovePen(start, centerY + fn(start)); for (double x = start; x <= stop; x += Incr) LineTo(x, centerY + fn(x)); }
if (one == two) return 0; else if (one < two) return -1; else return 1; }
struct studentT { string first, last; int idNum; string emailAddress; }; int main() { Set
struct studentT { string first, last; int idNum; }; int CmpById(studentT a, studentT b) { if (a.idNum < b.idNum) return -1; else if (a.idNum == b.idNum) return 0; else return 1; } int main() { Set