Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- string number;
- short int digit;
- int main()
- {
- cin>>number;
- for(int n=0;number[n];++n)
- {
- digit=number[n]-'0';
- if(digit==0)
- {
- for(int i=1;i<=5;++i)
- {
- if(i==1||i==5)
- for(int j=1;j<=5;++j)
- cout<<'@';
- else
- for(int j=1;j<=5;++j)
- if(j==1 || j==5)
- cout<<'@';
- else
- cout<<' ';
- cout<<'\n';
- }
- cout<<'\n';
- }
- else if(digit==1)
- {
- for(int i=1;i<=5;++i)
- {
- if(i==5)
- for(int j=1;j<=5;++j)
- cout<<'@';
- else
- for(int j=1;j<=5;++j)
- if(j==3||(i==2&&j==2))
- cout<<'@';
- else
- cout<<' ';
- cout<<'\n';
- }
- cout<<'\n';
- }
- else if(digit==2)
- {
- for(int i=1; i<=5; i++)
- {
- if(i==1 || i==5)
- for(int j=1;j<5;j++)
- cout<<'@';
- else
- for(int j=1; j<5; j++)
- if((i==2&&(j==1||j==4))||(i==3&&j==3)||(i==4&&j==2))
- cout<<'@';
- else
- cout<<' ';
- cout<<'\n';
- }
- cout<<'\n';
- }
- else if(digit==3)
- {
- for(int i=1;i<=5;++i)
- {
- if(i==1||i==3||i==5)
- for(int j=1;j<=5;++j)
- cout<<'@';
- else
- for(int j=1;j<=5;++j)
- if(j==5)
- cout<<'@';
- else
- cout<<' ';
- cout<<'\n';
- }
- cout<<'\n';
- }
- else if(digit==4)
- {
- for(int i=1;i<=5;++i)
- {
- if(i==3)
- for(int j=1;j<=5;++j)
- cout<<'@';
- else
- for(int j=1;j<=5;++j)
- if((j==1&&i!=4&&i!=5)||j==5)
- cout<<'@';
- else
- cout<<' ';
- cout<<'\n';
- }
- cout<<'\n';
- }
- else if(digit==5)
- {
- for(int i=1;i<=5;++i)
- {
- if(i==1||i==3||i==5)
- for(int j=1;j<=5;++j)
- cout<<'@';
- else
- for(int j=1;j<=5;++j)
- if((j==1&&i!=4)||(j==5&&i!=2))
- cout<<'@';
- else
- cout<<' ';
- cout<<'\n';
- }
- cout<<'\n';
- }
- else if(digit==6)
- {
- for(int i=1;i<=5;++i)
- {
- if(i==1||i==3||i==5)
- for(int j=1;j<=5;++j)
- cout<<'@';
- else
- for(int j=1;j<=5;++j)
- if(j==1||(j==5&&i!=2))
- cout<<'@';
- else
- cout<<' ';
- cout<<'\n';
- }
- cout<<'\n';
- }
- else if(digit==7)
- {
- for(int i=1;i<=5;++i)
- {
- if(i==1)
- for(int j=1;j<5;++j)
- cout<<'@';
- else
- for(int j=1;j<=5;++j)
- if(j==4||(i==3&&j==3)||(i==3&&j==5))
- cout<<'@';
- else
- cout<<' ';
- cout<<'\n';
- }
- cout<<'\n';
- }
- else if(digit==8)
- {
- for(int i=1;i<=5;++i)
- {
- if(i==1||i==3||i==5)
- for(int j=1;j<=5;++j)
- cout<<'@';
- else
- for(int j=1;j<=5;++j)
- if(j==1||j==5)
- cout<<'@';
- else
- cout<<' ';
- cout<<'\n';
- }
- cout<<'\n';
- }
- else if(digit==9)
- {
- for(int i=1;i<=5;++i)
- {
- if(i==1||i==3)
- for(int j=1;j<=5;++j)
- cout<<'@';
- else
- for(int j=1;j<=5;++j)
- if((j==1&&i!=4&&i!=5)||j==5)
- cout<<'@';
- else
- cout<<' ';
- cout<<'\n';
- }
- cout<<'\n';
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment