| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Presentation Error!!啊!!!帮帮忙!!#include <stdio.h>
#include <fstream.h>
void main()
{
ofstream outf("test.txt");
char number[10][5][4]={{{' ','-',' ','\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'}}};
char c;
int s;
while(1)
{
char n[10]={'\0'};
scanf("%d",&s);
getchar();
for(int num=0;num<9;num++)
{
scanf("%c",&c);
if(c=='\n') break;
n[num]=c;
}
if(s==0&&n[0]=='0') break;
for(int i=0;i<5;i=i+2)
{
for(int k=0;k<num;k++)
{
for(int j=0;j<3;j++)
{
if(j==1)
{
int r=0;
while(r<s)
{
printf("%c",number[n[k]-'0'][i][j]);
outf<<number[n[k]-'0'][i][j];
r++;
}
continue;
}
printf("%c",number[n[k]-'0'][i][j]);
outf<<number[n[k]-'0'][i][j];
}
printf(" ");
outf<<" ";
}
printf("\n");
outf<<endl;
if(i<4)
{int p=0;
while(p<s)
{
for(int k=0;k<num;k++)
{
for(int j=0;j<3;j++)
{
if(j==1)
{
int r=0;
while(r<s)
{
printf("%c",number[n[k]-'0'][i+1][j]);
outf<<number[n[k]-'0'][i+1][j];
r++;
}
continue;
}
printf("%c",number[n[k]-'0'][i+1][j]);
outf<<number[n[k]-'0'][i+1][j];
}
printf(" ");
outf<<" ";
}
p++;
printf("\n");
outf<<endl;
}
}
}
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator