一个非常好玩的算法题
现有一带有标记的字符串 "#0我们都一样#1懂我的只有你#2一万个理由#n你到底爱谁"。其中, #0表示 红色, #1表示 绿色, #2表示 蓝色,#n表示换行。
实现 drawMulString() 函数,绘制此字符串。
2011-03-22 10:03
2011-03-22 10:25
2011-03-22 10:28
2011-03-22 12:50
2011-03-22 14:21
2011-03-22 14:29
2011-03-22 17:55
程序代码:
#include <stdio.h>
int main(void)
{
int color;
textcolor(10);
cprintf("我们都一样");
textcolor(20);
cprintf("懂我的只有你");
textcolor(30);
cprintf("一万个理由\n");
textcolor(40);
printf("你到底爱谁");
return 0;
}
2011-03-22 18:30

2011-03-22 18:37
2011-03-22 19:53