C Codes
Beginners
C on Unix
Code Snippets
Data Structures
File Operations
Games Graphics
Gnu-Linux
Hardware
Mathematics
Miscellaneous
Small Programs
Sorting
C > Games and Graphics sample source codes
The Mind Reader
The Mind Reader #include
#include
#include
#include
void fun(int x,int y,int n,int a) { textcolor(13); gotoxy(x,y); cprintf("%d->%c",n,a); } void box(int c,int r,int s,int y) { int i ; textcolor(3); gotoxy(s,y); cprintf("%c",218); for(i=s+1;i
%c ",i,a[rand()%65]); gotoxy(10,i+1); cprintf("%d->%c ",i+22,a[rand()%65]); gotoxy(17,i+1); cprintf("%d->%c ",i+44,a[rand()%65]); gotoxy(24,i+1); cprintf("%d->%c ",i+66,a[rand()%65]); } fun(3,10,9,r); fun(3,19,18,r); fun(10,6,27,r); fun(10,15,36,r); fun(17,2,45,r); fun(17,11,54,r); fun(17,20,63,r); fun(24,7,72,r); fun(24,16,81,r); for(i=1;i<12;i++) { gotoxy(31,i+1); cprintf("%d->%c ",i+88,a[rand()%65]); } gotoxy(55,7); textcolor(15+BLINK); cprintf("Press Any Key"); getch(); gotoxy(55,7); textcolor(BLACK); cprintf("Press Any Key"); gotoxy(61,7); textcolor(15+BLINK); cprintf("%c",r); } void main() { int i; clrscr(); ran(); getch(); }
Privacy Policy
|
Link to Us
|
Links