CODE
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
main()
{
int i,n,x,c,y;
int length=100;
int arr [7][7];
int a[length];
printf("enter the size:");
scanf("%d",&n);
printf("enter the no:");
scanf("%d",&x);
y=x;
for(i=n-1;i>0;i--)
{
c=(int)y/pow(10,i-1);
a[i]=c;
printf("%d",c);
y=y-c*pow(10,i-1);
}
switch©
{
case 0:arr[][7]={1,1,1,1,1,1,1,
1,0,0,0,0,0,1,
1,0,0,0,0,0,1,
1,0,0,0,0,0,1,
1,0,0,0,0,0,1,
1,0,0,0,0,0,1,
1,1,1,1,1,1,1};
break;
case 1:arr[][7]={0,0,0,1,0,0,0,
0,0,1,1,0,0,0,
0,1,0,1,0,0,0,
0,0,0,1,0,0,0,
0,0,0,1,0,0,0,
0,0,0,1,0,0,0,
1,1,1,1,1,1,1};
break;
case 2:arr[][7]={1,1,1,1,1,1,1,
0,0,0,0,0,0,1,
0,0,0,0,0,0,1,
1,1,1,1,1,1,1,
1,0,0,0,0,0,0,
1,0,0,0,0,0,0};
case 3:arr[][7]={1,1,1,1,1,1,1,
0,0,0,0,0,0,1,
0,0,0,0,0,0,1,
1,1,1,1,1,1,1,
0,0,0,0,0,0,1,
0,0,0,0,0,0,1,
1,1,1,1,1,1,1};
break;
case 4:arr[][7]={1,0,0,0,0,0,1,
1,0,0,0,0,0,1,
1,0,0,0,0,0,1,
1,1,1,1,1,1,1,
0,0,0,0,0,0,1,
0,0,0,0,0,0,1,
0,0,0,0,0,0,1};
break;
case 5:arr[][7]={1,1,1,1,1,1,1,
1,0,0,0,0,0,0,
1,0,0,0,0,0,0,
1,1,1,1,1,1,1,
0,0,0,0,0,0,1,
0,0,0,0,0,0,1,
1,1,1,1,1,1,1};
break;
case 6:arr[][7]={1,1,1,1,1,1,1,
1,0,0,0,0,0,0,
1,0,0,0,0,0,0,
1,1,1,1,1,1,1,
1,0,0,0,0,0,1,
1,0,0,0,0,0,1,
1,1,1,1,1,1,1};
break;
case 7:arr[][7]={1,1,1,1,1,1,1,
0,0,0,0,0,0,1,
0,0,0,0,0,0,1,
0,0,0,0,0,0,1,
0,0,0,0,0,0,1,
0,0,0,0,0,0,1,
0,0,0,0,0,0,1};
break;
case 8:arr[][7]={1,1,1,1,1,1,1,
1,0,0,0,0,0,1,
1,0,0,0,0,0,1,
1,1,1,1,1,1,1,
this manner i have created 9 nos but i m not sure if my ;logic is prefect i have to call a function biglen(170) then it will represent my no in big 7*7 matrices.
Any help will be appreciated.
Thanks alot .
EDIT - CODE Tags Added -b2c-