Tuesday, April 13, 2010

Character Generation

#include
#include
void main()
{
int a[5][7],i,j;
clrscr();
cout<<"Enter the array";
for(i=0;i<7;i++)
{
for(j=0;j<5;j++)
{
cin>>a[i][j];
}
cout<
}
for(i=0;i<7;i++)
{
for(j=0;j<5;j++)
{
if(a[i][j]==0)
{
cout<<" ";
}
else
{
cout<
}
}
cout<
}
getch();
}
/*Output

Enter the array
0 0 0 0 0                                                                      
0 0 1 0 0                                                                      
0 1 0 1 0                                                                      
1 0 0 0 1                                                                      
1 1 1 1 1                                                                      
1 0 0 0 1
1 0 0 0 1


    1
 1    1
1      1
11111
1      1
1      1 */

0 comments:

Post a Comment

 
ShareThis

Visitor

Website counter
Copyright 2009 Code's. Powered by Blogger
Blogger Templates created by Deluxe Templates
Wordpress by Wpthemescreator
Blogger Showcase