显示一处错误,不知道怎么看,大佬帮忙给我这个小白看看
CSDN问答 2021-12-30 13:50:05 阅读数:464
显示一处错误,不知道怎么看,大佬帮忙给我这个小白看看
你的putchar写的是啥,别乱写呀
putchar(f<0.0f?".:-=#%a"[(int)(f-8.0f)"]:); 这句是要输出什么?
供参考:
#include <stdio.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)] : ' '); } putchar('\n'); } getchar(); return 0;}
版权声明:本文为[CSDN问答]所创,转载请带上原文链接,感谢。 https://ask.csdn.net/questions/7613085