Go: package main

import (
	"bufio"
	"fmt"
		"os"
	"strconv"
	"strings"
	)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	table := [10]string{
		"* = ****",
		"* =* ***",
		"* =** **",
		"* =*** *",
		"* =**** ",
		" *= ****",
		" *=* ***",
		" *=** **",
		" *=*** *",
		" *=**** ",
	}
	for scanner.Scan() {
		tmp := strings.Split(fmt.Sprintf("%05s", scanner.Text()), "")
		ans := make([]string, 0)
		for _, v := range tmp {
			iv, _ := strconv.Atoi(v)
			ans = append(ans, table[iv])
		}
		for i := 0; i < 8; i++ {
			for j := 0; j < 5; j++ {
				fmt.Print(string(ans[j][i]))
			}
			fmt.Println()
		}
	}
}

C++: #include <iostream>
#include <cmath>
#include <string>

using namespace std;

int main() {
	int n;
	string tama[10] = {"* = ****", "* =* ***", "* =** **", "* =*** *", "* =**** ",
					   " *= ****", " *=* ***", " *=** **", " *=*** *", " *=****"};

	while (cin >> n) {
		int a[5];
		for (int i = 4; i >= 0; i--) {
			a[4-i] = n / (int)pow(10, i);
			n = n % (int)pow(10, i);
		}
		for (int i = 0; i < 8; i++) {
			for (int j = 0; j < 5; j++) {
				cout << tama[a[j]][i];
			}
			cout << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<vector>
using namespace std;

int main()
{
  string n;
  string data[8]={
    "*****     ",
    "     *****",
    "==========",
    " **** ****",
    "* **** ***",
    "** **** **",
    "*** **** *",
    "**** **** "
  };
  bool flag =false;
  for(;cin>>n;)
    {
      if(flag)
	cout<<endl;
      flag=true;
      while(n.size()<5)
	n="0"+n;
      char ans[8][5];
      for(int i=0;i<5;i++)
	{
	  int x=n[i]-'0';
	  for(int j=0;j<8;j++)
	    {
	      //	      cout<<"j,x="<<j<<","<<x;
	      //	      cout<<"  "<<data[j][x]<<endl;
	    ans[j][i]=data[j][x];
	    }
	}

      for(int i=0;i<8;i++,cout<<endl)
	for(int j=0;j<5;j++)
	  cout<<ans[i][j];
      
    }

}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int ue[2][2] = {
	{1, 0},
	{0, 1}
};

int sita[5][5] = {
	{0, 1, 1, 1, 1},
	{1, 0, 1, 1, 1},
	{1, 1, 0, 1, 1},
	{1, 1, 1, 0, 1},
	{1, 1, 1, 1, 0},
};

int ue_s[5][2];
int sita_s[5][5];

int main(){
	
	int n, dum;
	
	for(int loop = 0; loop >= 0; loop++){
		
		cin >> n;
		
		if(cin.eof()){
			break;
		}
		
		if(loop != 0){
			printf("\n");
		}
		
		for(int i = 0; i < 5; i++){
			dum = n % 10;
			for(int j = 0; j < 2; j++){
				ue_s[i][j] = ue[dum / 5][j];
			}
			for(int j = 0; j < 5; j++){
				sita_s[i][j] = sita[dum % 5][j];
			}
			n /= 10;
		}
		
		for(int i = 0; i < 2; i++){
			for(int j = 4; j >= 0; j--){
				if(ue_s[j][i]){
					printf("*");
				}else{
					printf(" ");
				}
			}
			printf("\n");
		}
		
		printf("=====\n");
		
		for(int i = 0; i < 5; i++){
			for(int j = 4; j >= 0; j--){
				if(sita_s[j][i]){
					printf("*");
				}else{
					printf(" ");
				}
			}
			printf("\n");
		}
	}
	
	return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;

int charToInt(char c) {
  return (int)c - (int)'0';
}
int j;
void showSoro(string str) {
  string num = "00000";
  for(int i = 0; i < str.length(); i++) {
    num[i+5-str.length()] = str[i];
  }

  for(int i = 0; i < 5; i++) {
    if(charToInt(num[i]) >= 5) cout << ' ';
    else                       cout << '*';
  }
  cout << endl;
  for(int i = 0; i < 5; i++) {
    if(charToInt(num[i]) >= 5) cout << '*';
    else                       cout << ' ';
  }
  cout << endl;
  cout << "=====" << endl;

  for(int l = 0; l < 5; l++) {
    for(int i = 0; i < 5; i++) {
      if(charToInt(num[i]) % 5 == l) cout << ' ';
      else                           cout << '*';
    }
    cout << endl;
  }
}

int main() {
  string str;
  bool flag = false;
  while(cin >> str) {
    if(flag) cout << endl;
    showSoro(str);
    flag = true;
  }
  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;

int main(){
	bool f=false;
	int n,i,j;
	int a[6];
	char a0[11][10]={"* = ****","* =* ***","* =** **","* =*** *","* =**** "," *= ****"," *=* ***"," *=** **"," *=*** *"," *=**** "};
	while(cin>>n){
		if(f==true) {cout<<endl;}
	a[0]=n/10000;
	a[1]=(n-a[0]*10000)/1000;
	a[2]=(n-a[0]*10000-a[1]*1000)/100;
	a[3]=(n-a[0]*10000-a[1]*1000-a[2]*100)/10;
	a[4]=(n-a[0]*10000-a[1]*1000-a[2]*100-a[3]*10);
	for(i=0;i<8;i++){
		for(j=0;j<5;j++){
			cout<<a0[a[j]][i];
		}
		cout<<endl;
	}
	f=true;
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>

using namespace std;

string ab[10] = {"* = ****",
		"* =* ***",
		"* =** **",
		"* =*** *",
		"* =****",
		" *= ****",
		" *=* ***",
		" *=** **",
		" *=*** *",
		" *=**** "};
char ans[8][5];
int in;
bool endline = false;


void make(int num, int pos){
  for(int i = 0; i < 8; i++)
    ans[i][pos] = ab[num][i];

}
void solve(){
  for(int i = 4; i >= 0; i--){
    make(in%10,i);
      in/=10;
  }
}

void print(){
  for(int i = 0; i < 8; i++){
    for(int j = 0; j < 5; j++)
      cout << ans[i][j];
    cout << endl;
  }

}

int main(){
  while(cin >> in){
    if(endline) cout << endl;
    solve();
    print();
    endline = true;
  }
  return 0;
}

C++: #include <iostream>

using namespace std;
string so[10]=
  {
    "* = ****",
    "* =* ***",
    "* =** **",
    "* =*** *",
    "* =**** ",
    " *= ****",
    " *=* ***",
    " *=** **",
    " *=*** *",
    " *=**** "
  };

int main() {
  string s;
  char start[8][6] = {
    "*****",
    "     ",
    "=====",
    "     ",
    "*****",
    "*****",
    "*****",
    "*****"
  };
  
  char grid[8][6];
  bool blink = 0;
  while(cin >> s) {
    if(blink) cout << endl;
    blink = 1;
    for(int i=0; i<8; i++)
      for(int j=0; j<6; j++)
	grid[i][j] = start[i][j];
    
    int const size = s.size();
    int const OFFSET = 5-s.size();
    
    for(int j=0; j<5-OFFSET; j++)
      for(int i=0; i<8; i++)
	grid[i][j+OFFSET] = so[(int)(s[j]-'0')][i];
    
    for(int i=0; i<8; i++) {
      cout << grid[i] << endl;
    }
  }
  
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <complex>
#include <map>
#include <climits>
#include <sstream>
using namespace std;

#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second
#define mkp make_pair

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vint;
static const int INF=1<<24;

template <class T>
void initvv(vector<vector<T> > &v,int a,int b, const T  &t = T()){
	v.assign(a,vector<T>(b,t));
}

//v.erase(unique(v.begin(),v.end()),v.end());

string a="**=*****";
int main(){
	int n;
	bool f=true;
	while(cin>>n){
		if(!f) cout<<endl;
		f=false;
		stringstream ss[8];
		int b=10000;
		rep(i,5){
			int t=n/b;
			n%=b;
			b/=10;
			string ans=a;
			if(t>4) ans[0]=' ';
			else ans[1]=' ';
			ans[3+t%5]=' ';
			rep(j,8){
				ss[j]<<ans[j];
			}
		}
		// cout<<"hoge\n";
		rep(i,8){
			string tmp;
			getline(ss[i],tmp);
			cout<<tmp<<endl;
		}
		// cout<<endl;
	}
}