texture print

3 views
Skip to first unread message

Muhammad Taimur Adil

unread,
Jan 9, 2012, 1:08:33 PM1/9/12
to Learn C Language
run it in TC and tell me what you see




#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<dos.h>
int blinkstar(void);
int main(){
clrscr();
textmode(BW40);
blinkstar();
getch();
return 0;
}

int blinkstar(void){
int i,x,y,n;
for(i=5000;i>=1;i--){
x=rand()%40;
y=rand()%40;
n=rand()%500;

gotoxy(x,y);
delay(5);
textattr(n);
cprintf(" ");
}
return 0;
}





Copy right 2012

Abdul Rehman

unread,
Jan 10, 2012, 10:04:19 AM1/10/12
to codinge...@googlegroups.com
Nice!


--
You received this message because you are subscribed to the Google
Groups "Learn C Language + JAVA" group.
To post to this group, send email to codinge...@googlegroups.com
To unsubscribe from this group, send email to
codingexample...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/codingexamples?hl=en?hl=en

THANKS....



--
Thanks.

AHMAD KAMAL

unread,
Jan 10, 2012, 11:04:19 AM1/10/12
to codinge...@googlegroups.com
I see "rand ( );" which our sir told us not to touch and call skip( );
Reply all
Reply to author
Forward
0 new messages