রবিবার, ২৮ আগস্ট, ২০১৬

UVA 445 - Marvelous Mazes

///...................SUBHASHIS MOLLICK....................///
///.....DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING....///
///.............ISLAMIC UNIVERSITY,BANGLADESH.............///
///.....................SESSION-(14-15)....................///
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<ctype.h>
#include<bits/stdc++.h>
using namespace std;
main()
{
char s[10000]={0},count=1;;
while(gets(s))
{
long i,j,l,k=0,j1,j2;
l=strlen(s);
for(i=0;i<l;i++)
{
if(isdigit(s[i]))
{
k=k+(s[i]-48);
}
else if(s[i]>='A' && s[i]<='Z')
{
for(j=1;j<=k;j++)
{
printf("%c",s[i]);
}
k=0;
}
else if(s[i]=='b')
{
for(j1=1;j1<=k;j1++)
{
printf(" ");
}
k=0;
}
else if(s[i]=='!')
{
printf("\n");
}
else if(s[i]=='*')
{
for(j2=1;j2<=k;j2++)
{
printf("*");
}
k=0;
}
}
printf("\n");
/*count++;
if(count>1)
printf("\n");*/

}
}

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন

Factory Pattern

Factory Method  is a creational design pattern that provides an interface for creating objects in a superclass but allows subclasses to alte...