Digit

  • October 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Digit as PDF for free.

More details

  • Words: 203
  • Pages: 5
#include #include #include #include

"stdio.h" "conio.h" "stdlib.h" "dos.h"

void main() { int i=12,j,x=35,y=20,c,m; int i0; int rs[][11][9] = {{0,0,0,0,0,0,0,0,0, 0,0,1,1,1,1,2,0,0, 0,1,1,2,0,1,1,2,0, 0,1,1,2,0,1,1,2,0, 0,1,1,2,0,1,1,2,0, 0,1,1,2,0,1,1,2,0, 0,1,1,2,0,1,1,2,0, 0,1,1,2,0,1,1,2,0, 0,1,1,2,0,1,1,2,0, 0,0,1,1,1,1,2,0,0, 0,0,0,0,0,0,0,0,0},//0 {0,0,0,0,0,0,0,0,0, 0,0,0,1,1,2,0,0,0, 0,0,1,1,1,2,0,0,0, 0,0,1,1,1,2,0,0,0, 0,0,0,1,1,2,0,0,0, 0,0,0,1,1,2,0,0,0, 0,0,0,1,1,2,0,0,0, 0,0,0,1,1,2,0,0,0, 0,0,0,1,1,2,0,0,0, 0,0,1,1,1,1,2,0,0, 0,0,0,0,0,0,0,0,0},//1 {0,0,0,0,0,0,0,0,0, 0,0,1,1,1,1,2,0,0, 0,1,2,0,0,1,1,2,0, 0,0,0,0,0,1,1,2,0, 0,0,0,0,0,1,1,2,0, 0,0,1,1,1,1,2,0,0, 0,1,1,2,0,0,0,0,0, 0,1,1,2,0,0,0,0,0, 0,1,1,2,0,0,0,0,0, 0,0,1,1,1,1,1,2,0, 0,0,0,0,0,0,0,0,0},//2

{0,0,0,0,0,0,0,0,0, 0,0,1,1,1,1,2,0,0, 0,1,2,0,0,1,1,2,0, 0,0,0,0,0,1,1,2,0, 0,0,0,0,0,1,1,2,0, 0,0,0,1,1,1,2,0,0, 0,0,0,0,0,1,1,2,0, 0,0,0,0,0,1,1,2,0, 0,1,2,0,0,1,1,2,0, 0,0,1,1,1,1,2,0,0, 0,0,0,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0,1,1,2,0, 0,0,1,1,1,1,2,0,0, 0,0,0,0,0,0,0,0,0},//8 {0,0,0,0,0,0,0,0,0, 0,0,1,1,1,1,2,0,0, 0,1,1,2,0,1,1,2,0, 0,1,1,2,0,1,1,2,0, 0,1,1,2,0,1,1,2,0, 0,0,1,1,1,1,1,2,0, 0,0,0,0,0,1,1,2,0, 0,0,0,0,0,1,1,2,0, 0,1,2,0,0,1,1,2,0, 0,0,1,1,1,1,2,0,0, 0,0,0,0,0,0,0,0,0},//9 {0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,

0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0}};//CLR clrscr(); randomize(); // int i0 = random(10) // if (i0 <= 10) do{ //clrscr(); i0=random(10); for(int i1=0;i1<=11;i1++) { gotoxy(x,y); for(int i2=0;i2<=9;i2++) { if (rs[i0][i1][i2] == 1) { rs[i0][i1][i2] = -37; } else if (rs[i0][i1][i2] == 2) { rs[i0][i1][i2] = -79; } printf("%c",rs[i0][i1][i2]); }

y++; } delay(300); y=y-12; if(kbhit()) c=getch(); if(c==27) goto ed; }while(i0 < 11);

ed: gotoxy(28,50); printf("Press any key to exit"); getch(); }

Related Documents

Digit
October 2019 40
Digit Art
December 2019 21
Digit Fidgets
June 2020 20
Convert Digit
June 2020 21