朱色虫居
Pages
Home
Featured Posts
2006/10/12
445-Marvelous Mazes
/*
"Marvelous Mazes"
Level:2.0
Date:2006/10/11
*/
#include
#include
main(){
char c=0;
int n=0;
/*
FILE *fptr;
if((fptr=fopen("test.txt","r"))==NULL)
printf("File can't not be open!\n");
while(!feof(fptr)){
fscanf(fptr,"%c", &c);
*/
while(1){
scanf("%c",&c);
if(feof(stdin)) /*determine whether the EOF indicator is set*/
break;
if(isdigit(c))
n += c-'0';
else{
int i=0;
if (c == '!' || c=='\n')
printf("\n");
else{
if (c == 'b') c=' ';
for(i=0;i < n;i++) printf("%c",c); n=0; } } } }
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment