热门

最新

红包

立Flag

投票

同城

我的

发布
qq_45843334
四月一日 君寻
6 年前
trueqq_45843334

考试虽然结束
但知识还是没有掌握啊
继续学习吧

CSDN App 扫码分享
分享
评论
4
打赏
  • 复制链接
  • 举报
下一条:
求助大佬,一个简单的矩形框,为什么打出来的和效果图不一样呢?#include<stdio.h>#include<windows.h> int width=16;int height=9;//gotoxy源文件 void gotoxy(int x, int y) { COORD pos; pos.X=x; pos.Y=y; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);}//游戏界面 void drawInterface( ){ //上下 int i=0, j=0; for(j=0;j<height;j+=height-1) { gotoxy(j,0); for(i=0;i<width;i++) { printf("-"); } printf("\n"); }//左右 for(j=0;j<width;j+=width-1) { for(i=0;i<height-2;i++) { gotoxy(i+1,j); printf("|\n"); } } }main( ){ drawInterface( ); return 0;}
立即登录