标题:热带鱼
只看楼主
live41
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:67
帖 子:12442
专家分:0
注 册:2004-7-22
得分:0 

#include<stdio.h> #include<dos.h> void printbk(char*s,int x,int y); void fish(char*FISH,int Fish_x,int Fish_y,int x,int y); void D_fish(char*FISH,int Fish_x,int Fish_y); int main() { char FISH2[]= " / " " / \\ " "<')_=<" " \\_/ " " \\ " ; char FISH1[]= " \\ " " / \\ " ">=_('>" " \\_/ " " / " ; char BK[]= "~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^^~^~^~^~^~^~" " o ~ o o ~ " " ' o ' " " o o o o " " ' ' ' " " ' ~ " " " " ~ . " " " " " " " " o ) " " ( ( " " ~ ) ) " " ) ~ ( ( ( " " ( ( o o ) ) ) " " o ) ) . ( ( ( " " ( ( /^^^^^^^^^^^^^^^^^^" "^^^^^^^^^^^^^^^^^^\ / " " ^^^^^^^^^ " ; char*FISH=FISH2 ; int key,x=53,y=10 ; int flag=1 ; union REGS regs ; regs.h.ah=1 ; regs.h.ch=13 ; regs.h.cl=0 ; int86(0x10,&regs,&regs); printbk(BK,13,3); while(1) { fish(FISH,5,6,x,y); if(flag>0)x--; else x++; if(x<15||x>53)flag*=-1,FISH=FISH==FISH1?FISH2:FISH1 ; /*D_fish(FISH,5,6);*/ } } void fish(char*FISH,int Fish_x,int Fish_y,int x,int y) { int i,j ; for(i=0;i<Fish_x;i++) for(j=0;j<Fish_y;j++) { gotoxy(x+j,y+i); if(*(FISH+i*Fish_y+j))putchar(*(FISH+i*Fish_y+j)); } delay(8500); /* sleep(1); */ for(i=0;i<Fish_x;i++) for(j=0;j<Fish_y;j++) { gotoxy(x+j,y+i); if(*(FISH+i*Fish_y+j))putchar(' '); } /*system("cls"); */ } void D_fish(char*FISH,int Fish_x,int Fish_y) { int temp,i,j ; for(i=0;i<Fish_x;i++) for(j=0;j<Fish_y/2;j++) { temp=*(FISH+i*Fish_y+j); *(FISH+i*Fish_y+j)=*(FISH+i*Fish_y+(Fish_y-j-1)); *(FISH+i*Fish_y+(Fish_y-j-1))=temp ; } } void printbk(char*s,int x,int y) { int i,j ; for(i=0;i<20;i++) for(j=0;j<48;j++) { gotoxy(x+j,y+i); if(*(s+i*48+j)!=32)putchar(*(s+i*48+j)); } }

2004-11-07 11:27
live41
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:67
帖 子:12442
专家分:0
注 册:2004-7-22
得分:0 

#include<stdio.h> #include<dos.h> void printbk(char*s,int x,int y); void fish(char*FISH,int Fish_x,int Fish_y,int x,int y); void D_fish(char*FISH,int Fish_x,int Fish_y); int main() { char FISH2[]= " / " " / \\ " "<')_=<" " \\_/ " " \\ " ; char FISH1[]= " \\ " " / \\ " ">=_('>" " \\_/ " " / " ; char BK[]= "~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^^~^~^~^~^~^~" " o ~ o o ~ " " ' o ' " " o o o o " " ' ' ' " " ' ~ " " " " ~ . " " " " " " " " o ) " " ( ( " " ~ ) ) " " ) ~ ( ( ( " " ( ( o o ) ) ) " " o ) ) . ( ( ( " " ( ( /^^^^^^^^^^^^^^^^^^" "^^^^^^^^^^^^^^^^^^\ / " " ^^^^^^^^^ " ; char*FISH=FISH2 ; int key,x=53,y=10 ; int flag=1 ; union REGS regs ; regs.h.ah=1 ; regs.h.ch=13 ; regs.h.cl=0 ; int86(0x10,&regs,&regs); printbk(BK,13,3); while(1) { fish(FISH,5,6,x,y); if(flag>0)x--; else x++; if(x<15||x>53)flag*=-1,FISH=FISH==FISH1?FISH2:FISH1 ; /*D_fish(FISH,5,6);*/ } } void fish(char*FISH,int Fish_x,int Fish_y,int x,int y) { int i,j ; for(i=0;i<Fish_x;i++) for(j=0;j<Fish_y;j++) { gotoxy(x+j,y+i); if(*(FISH+i*Fish_y+j))putchar(*(FISH+i*Fish_y+j)); } delay(8500); /* sleep(1); */ for(i=0;i<Fish_x;i++) for(j=0;j<Fish_y;j++) { gotoxy(x+j,y+i); if(*(FISH+i*Fish_y+j))putchar(' '); } /*system("cls"); */ } void D_fish(char*FISH,int Fish_x,int Fish_y) { int temp,i,j ; for(i=0;i<Fish_x;i++) for(j=0;j<Fish_y/2;j++) { temp=*(FISH+i*Fish_y+j); *(FISH+i*Fish_y+j)=*(FISH+i*Fish_y+(Fish_y-j-1)); *(FISH+i*Fish_y+(Fish_y-j-1))=temp ; } } void printbk(char*s,int x,int y) { int i,j ; for(i=0;i<20;i++) for(j=0;j<48;j++) { gotoxy(x+j,y+i); if(*(s+i*48+j)!=32)putchar(*(s+i*48+j)); } }

2004-11-07 11:28
live41
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:67
帖 子:12442
专家分:0
注 册:2004-7-22
得分:0 

#include<stdio.h> #include<dos.h> void printbk(char*s,int x,int y); void fish(char*FISH,int Fish_x,int Fish_y,int x,int y); void D_fish(char*FISH,int Fish_x,int Fish_y); int main() { char FISH2[]= " / " " / \\ " "<')_=<" " \\_/ " " \\ " ; char FISH1[]= " \\ " " / \\ " ">=_('>" " \\_/ " " / " ; char BK[]= "~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^^~^~^~^~^~^~" " o ~ o o ~ " " ' o ' " " o o o o " " ' ' ' " " ' ~ " " " " ~ . " " " " " " " " o ) " " ( ( " " ~ ) ) " " ) ~ ( ( ( " " ( ( o o ) ) ) " " o ) ) . ( ( ( " " ( ( /^^^^^^^^^^^^^^^^^^" "^^^^^^^^^^^^^^^^^^\ / " " ^^^^^^^^^ " ; char*FISH=FISH2 ; int key,x=53,y=10 ; int flag=1 ; union REGS regs ; regs.h.ah=1 ; regs.h.ch=13 ; regs.h.cl=0 ; int86(0x10,&regs,&regs); printbk(BK,13,3); while(1) { fish(FISH,5,6,x,y); if(flag>0)x--; else x++; if(x<15||x>53)flag*=-1,FISH=FISH==FISH1?FISH2:FISH1 ; /*D_fish(FISH,5,6);*/ } } void fish(char*FISH,int Fish_x,int Fish_y,int x,int y) { int i,j ; for(i=0;i<Fish_x;i++) for(j=0;j<Fish_y;j++) { gotoxy(x+j,y+i); if(*(FISH+i*Fish_y+j))putchar(*(FISH+i*Fish_y+j)); } delay(8500); /* sleep(1); */ for(i=0;i<Fish_x;i++) for(j=0;j<Fish_y;j++) { gotoxy(x+j,y+i); if(*(FISH+i*Fish_y+j))putchar(' '); } /*system("cls"); */ } void D_fish(char*FISH,int Fish_x,int Fish_y) { int temp,i,j ; for(i=0;i<Fish_x;i++) for(j=0;j<Fish_y/2;j++) { temp=*(FISH+i*Fish_y+j); *(FISH+i*Fish_y+j)=*(FISH+i*Fish_y+(Fish_y-j-1)); *(FISH+i*Fish_y+(Fish_y-j-1))=temp ; } } void printbk(char*s,int x,int y) { int i,j ; for(i=0;i<20;i++) for(j=0;j<48;j++) { gotoxy(x+j,y+i); if(*(s+i*48+j)!=32)putchar(*(s+i*48+j)); } }

2004-11-07 11:28
live41
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:67
帖 子:12442
专家分:0
注 册:2004-7-22
得分:0 

#include<stdio.h> #include<dos.h> void printbk(char*s,int x,int y); void fish(char*FISH,int Fish_x,int Fish_y,int x,int y); void D_fish(char*FISH,int Fish_x,int Fish_y); int main() { char FISH2[]= " / " " / \\ " "<')_=<" " \\_/ " " \\ " ; char FISH1[]= " \\ " " / \\ " ">=_('>" " \\_/ " " / " ; char BK[]= "~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^^~^~^~^~^~^~" " o ~ o o ~ " " ' o ' " " o o o o " " ' ' ' " " ' ~ " " " " ~ . " " " " " " " " o ) " " ( ( " " ~ ) ) " " ) ~ ( ( ( " " ( ( o o ) ) ) " " o ) ) . ( ( ( " " ( ( /^^^^^^^^^^^^^^^^^^" "^^^^^^^^^^^^^^^^^^\ / " " ^^^^^^^^^ " ; char*FISH=FISH2 ; int key,x=53,y=10 ; int flag=1 ; union REGS regs ; regs.h.ah=1 ; regs.h.ch=13 ; regs.h.cl=0 ; int86(0x10,&regs,&regs); printbk(BK,13,3); while(1) { fish(FISH,5,6,x,y); if(flag>0)x--; else x++; if(x<15||x>53)flag*=-1,FISH=FISH==FISH1?FISH2:FISH1 ; /*D_fish(FISH,5,6);*/ } } void fish(char*FISH,int Fish_x,int Fish_y,int x,int y) { int i,j ; for(i=0;i<Fish_x;i++) for(j=0;j<Fish_y;j++) { gotoxy(x+j,y+i); if(*(FISH+i*Fish_y+j))putchar(*(FISH+i*Fish_y+j)); } delay(8500); /* sleep(1); */ for(i=0;i<Fish_x;i++) for(j=0;j<Fish_y;j++) { gotoxy(x+j,y+i); if(*(FISH+i*Fish_y+j))putchar(' '); } /*system("cls"); */ } void D_fish(char*FISH,int Fish_x,int Fish_y) { int temp,i,j ; for(i=0;i<Fish_x;i++) for(j=0;j<Fish_y/2;j++) { temp=*(FISH+i*Fish_y+j); *(FISH+i*Fish_y+j)=*(FISH+i*Fish_y+(Fish_y-j-1)); *(FISH+i*Fish_y+(Fish_y-j-1))=temp ; } } void printbk(char*s,int x,int y) { int i,j ; for(i=0;i<20;i++) for(j=0;j<48;j++) { gotoxy(x+j,y+i); if(*(s+i*48+j)!=32)putchar(*(s+i*48+j)); } }

2004-11-07 11:28
Knocker
Rank: 8Rank: 8
等 级:贵宾
威 望:47
帖 子:10454
专家分:603
注 册:2004-6-1
得分:0 
哈哈,你不用贴了,我有钱了,自己贴!

九洲方除百尺冰,映秀又遭蛮牛耕。汽笛嘶鸣国旗半,哀伤尽处是重生。     -老K
治国就是治吏。礼义廉耻,国之四维。四维不张,国之不国。   -毛泽东
2004-11-07 13:27



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-7106-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.075518 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved