C语言循环心形代码.doc
#include<stdio.h>#include<windows.h>int main()int a,b;printf("n");printf("n");for(a=0;a<11;a+)for(b=0;b<7;b+)if(a=0|a=10)printf("%c ",2);if(a>0&&a<10)if(b<6)printf(" ");if(b=6)printf("%c",2);printf("n");/fengexianprintf("n");printf("n");printf("n");for(a=0;a<8;a+)for(b=0;b<12;b+)if(a=0)if(b=0|b=4|b=5|b=6|b=7|b=11)printf(" ");if(b=1|b=2|b=3|b=8|b=9|b=10)printf("%c",3);if(a=1)if(b=1|b=2|b=3|b=5|b=6|b=8|b=9|b=10)printf(" ");if(b=0|b=4|b=7|b=11)printf("%c",3);if(a=2)if(b=0)printf("%c",3);if(b=4)printf(" %c",3);if(b>0&&b<4)printf(" ");if(b=7)printf("%c",3);if(b=11)printf(" %c",3);if(b>7&&b<11)printf(" ");if(a=3)if(b=0|b>1&&b<10|b=11)printf(" ");if(b=1|b=10)printf("%c",3);if(a=4)if(b=0|b=1|b>2&&b<9|b=6|b=10|b=11)printf(" ");if(b=2|b=9)printf("%c",3);if(a=5)if(b=0|b=1|b=2|b>3&&b<8|b=9|b=10|b=11)printf(" ");if(b=3|b=8)printf("%c",3);if(a=6)if(b>=0&&b<4|b=5|b=6|b>7&&b<=11)printf(" ");if(b=7|b=4)printf("%c",3);if(a=7)if(b>=0&&b<5|b<5&&b<=11)printf(" ");if(b=5|b=6)printf("%c",3);printf("n");/fengexianprintf("n");printf("n");printf("n");for(a=0;a<11;a+)for(b=0;b<7;b+)if(a<10)if(b=1|b=6)printf("%c ",1);if(b>1&&b<6)printf(" ");if(a=10)printf("%c ",1);printf("n");system("pause");return 0;