Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n, c, ogl=0;
  8. string zero=" *** \n * * \n * * \n * * \n * * \n * * \n *** \n";
  9. string one=" ** \n * \n * \n * \n * \n * \n *** \n";
  10. string two=" *** \n * * \n * \n * \n * \n * \n ***** \n";
  11. string three=" *** \n * * \n * \n * \n * \n * * \n *** \n";
  12. string four=" * \n * \n * \n * * \n ***** \n * \n * \n";
  13. string five=" ***** \n * \n * \n **** \n * \n * * \n *** \n";
  14. string six=" *** \n * \n * \n **** \n * * \n * * \n *** \n";
  15. string seven=" ***** \n * \n * \n * \n * \n * \n * ";
  16. string eight=" *** \n * * \n * * \n *** \n * * \n * * \n *** \n";
  17. string nine=" *** \n * * \n * * \n **** \n * \n * \n *** \n";
  18. cin>>n;
  19. while(n!=0)
  20. {
  21. ogl=ogl*10+n%10;
  22. n=n/10;
  23. }
  24. while(ogl!=0)
  25. {
  26. c=ogl%10;
  27. if(c==0)
  28. cout <<zero<<endl;
  29. else if(c==1)
  30. cout <<one<<endl;
  31. else if(c==2)
  32. cout <<two<<endl;
  33. else if(c==3)
  34. cout <<three<<endl;
  35. else if(c==4)
  36. cout <<four<<endl;
  37. else if(c==5)
  38. cout <<five<<endl;
  39. else if(c==6)
  40. cout <<six<<endl;
  41. else if(c==7)
  42. cout <<seven<<endl;
  43. else if(c==8)
  44. cout << eight<<endl;
  45. else if(c==9)
  46. cout << nine<<endl;
  47. ogl=ogl/10;
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement