如何用C语言编程一个移动的爱心
//一个非常简陋的实现,看看行不行#include#includeusing namespace std;int main(){ char heart[10][10]= { {' ',' ','*','*',' ','*','*',' ',' ',' '}, {' ','*',' ',' ','*',' ',' ','*',' ',' '}, {' ','*',' ',' ','*',' ',' ','*',' ',' '}, {' ','*',' ',' ',' ',' ',' ','*',' ',' '}, {' ',' ','*',' ',' ',' ','*',' ','...全部
//一个非常简陋的实现,看看行不行#include#includeusing namespace std;int main(){ char heart[10][10]= { {' ',' ','*','*',' ','*','*',' ',' ',' '}, {' ','*',' ',' ','*',' ',' ','*',' ',' '}, {' ','*',' ',' ','*',' ',' ','*',' ',' '}, {' ','*',' ',' ',' ',' ',' ','*',' ',' '}, {' ',' ','*',' ',' ',' ','*',' ',' ',' '}, {' ',' ','*',' ',' ',' ','*',' ',' ',' '}, {' ',' ',' ','*',' ','*',' ',' ',' ',' '}, {' ',' ',' ','*',' ','*',' ',' ',' ',' '}, {' ',' ',' ',' ','*',' ',' ',' ',' ',' '}, {' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}, }; int index=0; while(1){ for(int i=0;i for(int ii=0;ii cout for(int j=0;j cout cout } index=(index 1); Sleep(300); system("cls"); } return 1;}。
收起