永发信息网

int x=100; 如何使用outtextxy函数,使在图形界面输出x,显示100。

答案:2  悬赏:30  手机版
解决时间 2021-04-04 05:00
  • 提问者网友:你独家记忆
  • 2021-04-03 05:53
int x=100; 如何使用outtextxy函数,使在图形界面输出x,显示100。
最佳答案
  • 五星知识达人网友:西风乍起
  • 2021-04-03 07:32
#include "graphics.h"
#include
#include
#include

void main()
{
int GD,GM,x=100;
char str[10];

GD=DETECT;
initgraph(&GD,&GM,"");
setfillstyle(SOLID_FILL,WHITE);
bar(0,0,639,479);
setcolor(BLACK);
line(20,239,620,239); // x轴
line(615,234,620,239);
line(615,244,620,239);
itoa(x,str,10);
outtextxy(600,255,str);
getch();
closegraph();
}
全部回答
  • 1楼网友:时间的尘埃
  • 2021-04-03 08:46
#include "graphics.h"
#include
#include
#include
void main()
{
int GD,GM,x=100;
char str[10];
GD=DETECT;
initgraph(&GD,&GM,"");
setfillstyle(SOLID_FILL,WHITE);
bar(0,0,639,479);
setcolor(BLACK);
line(20,239,620,239); // x轴
line(615,234,620,239);
line(615,244,620,239);
itoa(x,str,10);
outtextxy(600,255,str);
getch();
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯