Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n, c, ogl=0;
- string zero=" *** \n * * \n * * \n * * \n * * \n * * \n *** \n";
- string one=" ** \n * \n * \n * \n * \n * \n *** \n";
- string two=" *** \n * * \n * \n * \n * \n * \n ***** \n";
- string three=" *** \n * * \n * \n * \n * \n * * \n *** \n";
- string four=" * \n * \n * \n * * \n ***** \n * \n * \n";
- string five=" ***** \n * \n * \n **** \n * \n * * \n *** \n";
- string six=" *** \n * \n * \n **** \n * * \n * * \n *** \n";
- string seven=" ***** \n * \n * \n * \n * \n * \n * ";
- string eight=" *** \n * * \n * * \n *** \n * * \n * * \n *** \n";
- string nine=" *** \n * * \n * * \n **** \n * \n * \n *** \n";
- cin>>n;
- while(n!=0)
- {
- ogl=ogl*10+n%10;
- n=n/10;
- }
- while(ogl!=0)
- {
- c=ogl%10;
- if(c==0)
- cout <<zero<<endl;
- else if(c==1)
- cout <<one<<endl;
- else if(c==2)
- cout <<two<<endl;
- else if(c==3)
- cout <<three<<endl;
- else if(c==4)
- cout <<four<<endl;
- else if(c==5)
- cout <<five<<endl;
- else if(c==6)
- cout <<six<<endl;
- else if(c==7)
- cout <<seven<<endl;
- else if(c==8)
- cout << eight<<endl;
- else if(c==9)
- cout << nine<<endl;
- ogl=ogl/10;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement