C语言怎么打出一个大爱心的图形呀?
发布网友
发布时间:2022-04-21 13:49
我来回答
共1个回答
热心网友
时间:2022-07-12 07:09
我这个就是在VC++6.0下写的,你应该能打出来(几年前写的)——
//#include "stdafx.h"//If the vc++6.0, with this line.
#include "stdio.h"
int main(int argc,char *argv[]){
char a[]="I love you I love you I love you I l",m[4],i;
printf("\n\n\n");
printf("%*.*s\n",58,21,"_*=_ _=*_");
printf("%*.*s\n",61,25,"I love yo u I love!");
printf("%*.*s\n",63,29,"I love you I l ove you I love");
printf("%*.*s\n",65,33,a);
printf("%*.*s\n",66,35,a);
printf("%*.*s\n",66,35,a);
printf("%*.*s\n",65,33,a);
printf("%*.*s\n",,31,a);
printf("%*.*s\n",63,29,a);
printf("%*.*s\n",61,25,a);
printf("%*.*s\n",59,21,a);
printf("%*.*s\n",57,17,a);
printf("%*.*s\n",55,13,a);
printf("%*.*s\n",53,9,a);
printf("%*.*s\n",51,5,a);
printf("%*.*s\n",50,3,a);
printf("%*.*s\n",49,1,a);
return 0;
}
运行结果: