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