画椭圆代码出错# include # include # include # include void Midpoint
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/08/19 09:52:42
画椭圆代码出错
# include # include # include # include void MidpointEllipse(int a,int b,int color); int main() { int gdriver = DETECT,gmode=0; initgraph(500,600); MidpointEllipse(4,6,RED); getch(); closegraph(); return 0; } void MidpointEllipse(int a,int b,int color) { int x, y; float d1,d2; x=0; y=b; d1=b*b+a*a(-b+0.25); putpixel(x,y,color); while(b*b*(x+1)0) { if(d2<0) { d2+=b*b*(2*x+2)+a*a*(-2*y+3); x++;y--; } else { d2+=a*a*(-2*y+3); y--; } putpixel(x,y,color); } } d1=b*b+a*a(-b+0.25); d1+=(b*b*(2*x+3)+a*a(-2*y+2));__ error C2064: term does not evaluate to a function d2=sqr(b*(x+0.5))+sqr(a*(y-1))-sqr(a*b);__ error C2065: 'sqr' : undeclared identifier
# include
![画椭圆代码出错# include # include # include # include void Midpoint](/uploads/image/z/18696266-26-6.jpg?t=%E7%94%BB%E6%A4%AD%E5%9C%86%E4%BB%A3%E7%A0%81%E5%87%BA%E9%94%99%23+include+%23+include+%23+include+%23+include+void+Midpoint)
d1=b*b+a*a(-b+0.25); d1+=(b*b*(2*x+3)+a*a(-2*y+2));改成 d1=b*b+a*a*(-b+0.25); d1+=(b*b*(2*x+3)+a*a*(-2*y+2)); d2=sqr(b*(x+0.5))+sqr(a*(y-1))-sqr(a*b);改成 d2=sqrt(b*(x+0.5))+sqrt(a*(y-1))-sqrt(a*b);
#include
#include #include #include #include #include #include
#include #include #include
#include #include #include #include #include /* define
#include #include #include void fun (char *s) { FOUND
#include #include #include using namespace std;void main(){i
英语翻译#include #include #include #include #include #include #i
实在看不懂#include #include #include #include #include #include #
英语翻译#include #include #include #include #define WIN_CONSOLE
注释下面代码,#include #include #define N 10void sort (char *pstr[N
#include#include"gui.h"void main(){TFT_Init();Delay_Ms(20);G
#include #include // void fun(int a,int b,int c