Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	table := [10]string{
		"* = ****",
		"* =* ***",
		"* =** **",
		"* =*** *",
		"* =**** ",
		" *= ****",
		" *=* ***",
		" *=** **",
		" *=*** *",
		" *=**** ",
	}
	input := make([]string, 0)
	for scanner.Scan() {
		input = append(input, scanner.Text())
	}
	n := len(input)
	cnt := 0
	for cnt < n {
		tmp := strings.Split(fmt.Sprintf("%05s", input[cnt]), "")
		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()
		}
		if cnt != n-1 {
			fmt.Println()
		}
		cnt++
	}
}

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

int main(){
    int n;
    char num[5];
    char ans[8][5];
    bool judge = false;
    while(cin >> n){
        if(judge) cout << endl;
        sprintf(num,"%05d",n);
        for(int i=0;i<5;i++){
            ans[0][i] = '*';
            ans[1][i] = ' ';
            if(num[i] >= '5' && num[i] <= '9') swap(ans[0][i],ans[1][i]);
            ans[2][i] = '=';
            for(int j=3;j<8;j++) ans[j][i] = '*';
            ans[3+((num[i]-'0')%5)][i] = ' ';
        }
        for(int i=0;i<8;i++){
            for(int j=0;j<5;j++){
                cout << ans[i][j];
            }
            cout << endl;
        }
        judge = true;
    }
}

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

char number[][16] = {
	"* = ****", "* =* ***", "* =** **", "* =*** *", "* =**** ",
	" *= ****", " *=* ***", " *=** **", " *=*** *", " *=**** ", };

int main() {
	int n;
	bool flag = false;
	while(cin >> n) {
		char board[16][16] = {0};
		/* init */
		for(int i = 0; i < 5; i++) {
			for(int j = 0; j < 8; j++) {
				board[j][4 - i] = number[n % 10][j];
			}
			n /= 10;
		}

		if(flag)
			cout << endl;
		for(int i = 0; i < 8; i++)
			printf("%s\n", board[i]);
		flag = true;
	}

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()


int main() {
  string hoge[] = {"* = ****","* =* ***","* =** **","* =*** *","* =**** ",
                   " *= ****"," *=* ***"," *=** **"," *=*** *"," *=**** ",};
  int n;
  int f = 0;
  while(cin>>n) {
    if (f) cout << endl; else f++;
    vector<string> ans(5);
    REP(i,5) {
      ans[i] = hoge[n%10];
      n/=10;
    }
    reverse(ALL(ans));
    REP(y,8) {
      REP(x,5) {
        cout << ans[x][y];
      }
      cout << endl;
    }
  }
}

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;
}