新手刚学C语言,想修改一段代码可以帮下忙吗
代码如下:
#include<stdio.h>
#include<math.h>
#include<windows.h>
int main()
{
float x,y,z,f;
for(y=1.5f;y>-1.5f;y-=0.1f)
{
for(x=-1.5f;x<1.5f;x+=0.05f)
{
z=x*x+y*y-1;
f=z*z*z-x*x*y*y*y;
putchar(f<=0.0f?".:-=*#%@"[(int)(f*-8.0f)]:3);
}
putchar('\n');
}
getchar();
return 0;
}
想在图形中间的字符换成中文可以吗?
#include<stdio.h>
#include<math.h>
#include<windows.h>
int main()
{
float x,y,z,f;
for(y=1.5f;y>-1.5f;y-=0.1f)
{
for(x=-1.5f;x<1.5f;x+=0.05f)
{
z=x*x+y*y-1;
f=z*z*z-x*x*y*y*y;
putchar(f<=0.0f?".:-=*#%@"[(int)(f*-8.0f)]:3);
}
putchar('\n');
}
getchar();
return 0;
}
想在图形中间的字符换成中文可以吗?
...全文


