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++: #define _USE_MATH_DEFINES
#include <iostream>
#include <complex>
#include <algorithm>
#include <vector>
#include <stack>
#include <string>
#include <queue>
#include <cmath>
#include <math.h>
#include <numeric>
#include <list>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <climits>
#include <set>
#include <memory.h>
#include <memory>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cassert>
#include <map>
#include <cassert>
#include <time.h>

using namespace std;

typedef complex<double> xy_t;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int , P> PP;
typedef pair<int, string> Ps;
typedef vector<int> vec;
typedef vector<vec> mat;
const int INF= 1 << 30;
const double EPS = 1e-9;
const double PI = 3.1415926535897932384626433832795;

#define rep(i, n) for(int i = 0; i < n; i++)

string aba[] = {
	"* = ****",
	"* =* ***",
	"* =** **",
	"* =*** *",
	"* =**** ",
	" *= ****",
	" *=* ***",
	" *=** **",
	" *=*** *",
	" *=**** ",
};

int main(){
	int n;
	int cnt = 0;
	while(cin >> n){
		if(cnt == 0) cnt++;
		else cout << endl;
		int num = 1;
		string res[5];
		rep(i, 5){
			res[i] = aba[(n % (num * 10)) / num];
			num *= 10;
		}
		rep(i, 7){
			rep(j, 5){
				cout << res[4-j][i];
			}
			cout << endl;
		}
	}
	return 0;
}

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

int main() {
    while (true){
        int N;
        int num[5] = {0};
        
        cin >> N;
        
        //if(N == 0) break;
        
        num[0] = N/10000;
        N %= 10000;
        num[1] = N/1000;
        N %= 1000;
        num[2] = N/100;
        N %= 100;
        num[3] = N/10;
        N %= 10;
        num[4] = N;
        
        for(int i = 0; i < 5; i++) {
            if(num[i] < 5) cout << '*';
            else cout << " ";
        }
        
        cout << endl;
        
        for(int i = 0; i < 5; i++) {
            if(num[i] > 4) cout << '*';
            else cout << " ";
        }
        
        cout << endl;
        
        for(int i = 0; i < 5; i++) {
            cout << "=";
        }
        cout << endl;
        
        for(int i = 0; i > 5; i++) {
            if(num[i] > 4) num[i] -= 5;
        }
        
        for(int i = 0; i < 5; i++) {
            if(num[i] != 0) cout << '*';
            else cout << " ";
        }
        
        cout << endl;
        
        for(int i = 0; i < 5; i++) {
            if(num[i] != 1) cout << '*';
            else cout << " ";
        }
        
        cout << endl;
        
        for(int i = 0; i < 5; i++) {
            if(num[i] != 2) cout << '*';
            else cout << " ";
        }
        
        cout << endl;
        
        for(int i = 0; i < 5; i++) {
            if(num[i] != 3) cout << '*';
            else cout << " ";
        }
        
        cout << endl;
        
        for(int i = 0; i < 5; i++) {
            if(num[i] != 4) cout << '*';
            else cout << " ";
        }
        
        cout << "\n\n";
    }
    return 0;
}

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

string f[10] = {
	"* = ****",
	"* =* ***",
	"* =** **",
	"* =*** *",
	"* =**** ",
	" *= ****",
	" *=* ***",
	" *=** **",
	" *=*** *",
	" *=**** "
};

int main(){
	string s;
	bool flag = false;

	while( cin >> s ){
		string ans[10];
		if( flag ){
			cout << endl;
		}else{
			flag = true;
		}
		while( s.size() < 5 ){
			s = "0" + s;
		}

		for(int i=0 ; i < s.size() ; i++ ){
			ans[i] = f[s[i]-'0'];
		}
		for(int x=0 ; x < 8 ; x++ ){
			for(int y=0 ; y < s.size() ; y++ ){
				cout << ans[y][x];
			}
			cout << endl;
		}
	}
}

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>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    vector<string> values = {
            "* = ****",
            "* =* ***",
            "* =** **",
            "* =*** *",
            "* =**** ",
            " *= ****",
            " *=* ***",
            " *=** **",
            " *=*** *",
            " *=**** "
    };
    int n, a = 0;
    while(cin >> n){
        if(a++) puts("");
        vector<string> ans(5);
        for (int i = 4; i >= 0; --i) {
            ans[i] = values[n%10];
            n /= 10;
        }
        for (int i = 0; i < ans[0].size(); ++i) {
            for (int j = 0; j < ans.size(); ++j) {
                printf("%c", ans[j][i]);
            }
            puts("");
        }
    }
    return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>

using namespace std;

typedef long long ll;
typedef pair<string,int> P;

int main(){
	string str;
	string ge5[] = {"* ="," *="};
	string lt5[] = {" ****","* ***","** **","*** *", "**** "};
	bool isnl=false;
	while(getline(cin,str)){
		if(isnl) cout << endl;
		vector<string> res;
		for(int i=str.size()-1;i>=0;i--){
			string tmp="";
			tmp = ge5[(str[i]-'0') >= 5 ? 1 : 0];
			tmp = tmp + lt5[(str[i]-'0') % 5];
			res.push_back(tmp);
		}

		while(res.size()<5) res.push_back(ge5[0]+lt5[0]);

		reverse(res.begin(),res.end());
		for(int i=0;i<res[0].size();i++){
			for(int j=0;j<res.size();j++){
				printf("%c%s",res[j][i],j==res.size()-1 ? "\n" : "");
			}
		}
		isnl = true;
	}
}