Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- using namespace std;
- int main() {
- char c,ca;
- printf("%d",c-48);
- int num=0,cont=0,aux=0;
- int con=0;
- freopen("entrada.c","r",stdin);
- while(scanf("%c",&c)!=EOF&&con<=132) {
- con++;
- if(c>='1'&&c<='9'){
- aux=num;
- num=c-48;
- cont++;
- if(cont>1)
- num=num+aux;
- }
- if(c=='!')
- {
- printf("\n");
- cont=0;
- }
- if(c=='\n')
- {
- printf("\n");
- cont=0;
- }
- if(c=='b'){
- for(int j=0;j<num;j++) { printf(" ");
- cont=0;}
- }
- if(c=='*'){ for(int m=0;m<num;m++)
- { printf("*");
- cont=0;}
- }
- if(c>='A'&&c<='Z'){ for(int i=0;i<num;i++)
- { printf("%c",c);
- cont=0;
- }
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment