你的图列?
关键字:GDI+
直接体贴图不行马? 加载图片就好了
#include <stdio.h>
int main()
{
int i,j;
for (i = 0;i< 5;i++)
{
for (j=0;j<10;j++)
{
if(i == 4 && (j>0 && j < 9))
printf("-");
else
{
if(i+j == 4)
printf("/");
else if(i==j-5)
printf("\\");
else
printf(" ");
}
}
printf("\n");
}
return 0;
}
玩一下吧!有帮助请采纳,谢谢!
#include "stdio.h"
#include <string>
string genBlank(int n, char blank = ' ')
{
std::string s;
for (int i = 0; i < n; i++)
s += blank;
return s;
}
int main() {
for (int i = 0; i < 5; i++)
{
string s1 = genBlank(5 - i);
string s2 = i<4?genBlank(i*2): genBlank(i * 2, '_');
printf("%s/%s\\\n", s1.c_str(), s2.c_str());
}
system("pause");
}