注册 登录
编程论坛 C图形专区

【问】C语言的两个问题

jerry4966263 发布于 2008-03-25 21:08, 880 次点击
程序代码:
#include <conio.h>
       main()
       {
            int color;
            for(color=0;color<8;color++)
              {
                  textbackground(color);
                  cprintf("This is color %d\r\n",color);
                  printf("Press any key to continue!\n");
                  getch();
              }
     }
土问上边这个程序里面的cprintf和printf有虾米区别。。
getch是做虾米用的?
程序代码:
#include <conio.h>
main()
{

 int color;

 scanf("Please input the color you choose!",&color);
   textbackground(color);
   cprintf("This is color %d\r\n",color);
}

上面的程序运行时为虾米不显示我要输出的那句话啊,而且我输1时,屏幕上显示
This is color 29789。怎么回事啊。。

[[it] 本帖最后由 jerry4966263 于 2008-3-25 21:10 编辑 [/it]]
0 回复
1