High school time to do, the first two days to see, quite fun.
Just want to say, the original code style,,, cough, not the coquettish!
#include <stdio.h> #include <math.h>int main (void) {double y;int yy, M, N, x;for (yy = 0; yy <=; yy++) {y = 0.1 * yy;m = ACOs (1-y) * 10;n = $ * (y-1) + 31;for (x = 0; x <=) (x + +) {if (× = = m && x = = N printf ("+"), else if (x = = N) printf ("+"), else if (x = = m | | x = = 62-m) printf ("*"); elseprintf ("");} printf ("\ n");} return 0;}
After running
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6C/1D/wKioL1VAfdHCUBV_AAEMJfxncX8650.jpg "title=" 1.jpg " alt= "Wkiol1vafdhcubv_aaemjfxncx8650.jpg"/>
Another way--compare the numbers in the code (mainly for deeper understanding)
#include <math.h> #include <stdio.h>int main (void) {double y;int x, M, n;for (y = 0; y <= 2; y + = 0.1) {m = a COS (1-y) * 10;n = * (y-1) + 31;for (x = 0; x < n + +) {if (x = = m && x = =) Putchar (' ^ '); else if (x = = n) Putchar (' + '), else if (x = = m | | x = = 63-m) putchar (' * '); else Putchar (');} Putchar (' \ n ');} return 0;}
After running
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6C/1D/wKioL1VAfo-zlATOAAETiMrl9ao668.jpg "title=" 1.jpg " alt= "Wkiol1vafo-zlatoaaetimrl9ao668.jpg"/>
Not the first effect of good .... Right?!
This article is from the "hacker" blog, make sure to keep this source http://anglecode.blog.51cto.com/5628271/1640317
Chord function cos and straight line intersect in interesting graphs