#include int main() { double x0=50.0, y0=50.0, xmax=512.0, ymax=512.0, dx, dy, difference; int total_number, k, kprev, a, b, d; double y, yprev, deltay, deltayprev, c, e; scanf("%d\n", &total_number); difference=total_number*1.0; dx=xmax/difference; dy=ymax/3.2; //printf("%d\n", total_number); scanf("n=%d l(n)=%d sqrt(n)=%lf r=%lf estimate=%d 2nd estimate=%lf\n", &a, &b, &c, &yprev, &d, &e); //printf("n=%d l(n)=%d sqrt(n)=%.3f r=%.3f estimate=%d 2nd estimate=%.3f\n", // a, b, c, yprev, d, e); deltayprev=yprev; k=0; kprev=0; printf("%%!PS-Adobe-3.0 EPSF-3.0\n"); printf("/color1 {0.75 setgray} def\n"); printf("/color2 {0.5 setgray} def\n"); printf("%.3f %.3f translate\n", x0, y0); while ( scanf( "n=%d l(n)=%d sqrt(n)=%lf r=%lf estimate=%d 2nd estimate=%lf\n", &a, &b, &c, &y, &d, &e)==6 ) { //printf( // "n=%d l(n)=%d sqrt(n)=%.3f r=%.3f estimate=%d 2nd estimate=%.3f\n", // a, b, c, y, d, e); k++; //printf("%d\n", k); deltay=y-yprev; printf("%.3f %.3f moveto color2 %.3f %.3f lineto stroke\n", kprev*dx, yprev*dy, k*dx, y*dy); printf("%.3f %.3f moveto color1 %.3f %.3f lineto stroke\n", kprev*dx, deltayprev*dy, k*dx, deltay*dy); kprev=k; yprev=y; deltayprev=deltay; } printf( "0.0 %.3f moveto 0.0 setgray 0.0 0.0 lineto %.3f 0.0 lineto stroke\n", xmax, ymax); printf("showpage\n"); return 0; }