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 <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

string itos5 (int n )
{
	stringstream ss;
	ss << n;
	string res = ss.str();
	int len = res.length();
	int i;

	if (len < 5){
		for (i = 0; i < 5 - len; ++i){
			res = '0' + res;
		} // end for
	} // end if

	return res;
}

int main()
{
	const string pos[8] = {
	"*****     ",
	"     *****",
	"==========",
	" **** ****",
	"* **** ***",
	"** **** **",
	"*** **** *",
	"**** **** "
};
	int i,j,k;

//	cut here before submit 
//	freopen ("testcase.abacus", "r", stdin );
	string str = "";

	vector <vector <string> > R;

	while (getline (cin, str ) ){
		if (str.empty() ){
			break;
		} // end if
		vector <string> res (8, string ( 5, ' ') );
//		vector <string> res (10, string (5, ' ') );
		int n;
		string t = "";
		stringstream ss(str);
		ss >> n;

		t = itos5 (n );

		for (i = 0; i < 5; ++i){
			int m = t[i] - '0';
			for (j = 0; j < 8; ++j){
				res[j][i] = pos[j][m];
			} // end for
		} // end for
		
		R.push_back(res );
		res.clear();

	} // end loop
	int size = R.size();

	for (k = 0; k < size; ++k){
		vector<string>::iterator it = R[k].begin();
		for (; it != R[k].end(); ++it ){
			string str = (*it);
			int len = str.length();

			for (i = 0; i < len; ++i){
				cout << str[i];
			} // end for
			cout << endl;
		} // end for
		if (k != size - 1 ) {
			cout << endl;
		} // end if
	} // end for
	
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include"bits/stdc++.h"
#ifdef _DEBUG
#define DBG(n) n
#else
#define DBG(n)
#endif
#define INF          1e9
#define INFLL        1e18
#define EPS          1e-9
#define REP(i,n)     for(ll i=0,i##_len=(n);i<i##_len;++i)
#define REP1(i,n)    for(ll i=1,i##_len=(n);i<=i##_len;++i)
#define REPR(i,n)    for(ll i=(n)-1;i>=0;--i)
#define REPR1(i,n)   for(ll i=(n);i>0;--i)
#define REPC(i,obj)  for(auto i:obj)
#define ALL(obj)     (obj).begin(),(obj).end()
#define SETP(n)      cout<<fixed<<setprecision(n)
#define VV(T,h,w)    move(vector<vector<T>>(h,vector<T>(w)))
#define VVI(T,h,w,i) move(vector<vector<T>>(h,vector<T>(w,i)))
using namespace std;
using ll = long long;
template<typename T = ll>inline T in() { T ret; cin >> ret; return ret; }

signed main()
{
	ll n;
	for (ll h = 0; cin >> n; ++h) {
		if (h != 0)cout << endl;
		ll dg[5] = { n / 10000, n / 1000 % 10, n / 100 % 10, n / 10 % 10, n % 10 };
		REP(i, 5)cout << (dg[i] / 5 == 0 ? '*' : ' ');
		cout << endl;
		REP(i, 5)cout << (dg[i] / 5 == 1 ? '*' : ' ');
		cout << endl;
		cout << "=====";
		cout << endl;
		REP(i, 5) {
			REP(j, 5)cout << (dg[j] % 5 == i ? ' ' : '*');
			cout << endl;
		}
	}
}

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

int main(){
	string str;
	string s[8];
	s[0] = "*****     ";
	s[1] = "     *****";
	s[2] = "==========";
	s[3] = " **** ****";
	s[4] = "* **** ***";
	s[5] = "** **** **";
	s[6] = "*** **** *";
	s[7] = "**** **** ";
	bool flag = false;
	while(cin >> str){
		if(flag) cout << endl;
		int len = str.size();
		int num[5]={0};
		int cou=0;
		for(int i=5-len;i<5;i++){
			string tmp = "";
			tmp += str[cou];
			istringstream ss(tmp);
			ss >> num[i];
			cou++;
		}
		for(int i=0;i<8;i++){
			for(int j=0;j<5;j++){
				cout << s[i][num[j]];
			}
			cout << endl;
		}
		flag = true;
	}
}

C++: #include "bits/stdc++.h"
using namespace std;
using namespace std;
 
int main(void)
{
    static string input[1280];
    int cnt = 0;
     
    while (cin >> input[cnt]) cnt++;
     
    string data[10];
    data[0] = "* = ****";
    data[1] = "* =* ***";
    data[2] = "* =** **";
    data[3] = "* =*** *";
    data[4] = "* =**** ";
    data[5] = " *= ****";
    data[6] = " *=* ***";
    data[7] = " *=** **";
    data[8] = " *=*** *";
    data[9] = " *=**** ";
     
    for (int i = 0; i < cnt; i++){
        char output[10][10];
        string cur = "";
         
        for (int j = 0; j < 10; j++){
            for (int k = 0; k < 10; k++){
                output[j][k] = '\0';
            }
        }
         
        for (int j = 0; j < 5 - input[i].length(); j++){
            cur += '0';
        }
        cur += input[i];
        for (int j = 0; j < cur.length(); j++){
            int p = cur[j] - '0';
            for (int k = 0; k < 8; k++){
                output[k][j] = data[p][k];
            }
        }
        for (int j = 0; j < 8; j++){
            printf("%s\n", output[j]);
        }
        if (i + 1 != cnt) cout << endl;
    }
     
     
    return 0;
}

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

int main(){
	int n,c,a,i,j,count;
	while(cin >> n){
		int b[8][5];
		c = 10000;
		count = 0;
		for(i=0;i<5;i++){
			a = n/c;
			if(a<5) b[0][i] = 1;
			else b[1][i] = 1;
			b[2][i] = 2;
			if(a==0||a==5){
				for(j=4;j<8;j++){
					b[j][i] = 1;
				}
			}
			else if(a==1||a==6){
				for(j=3;j<8;j++){
					if(j==4) continue;
					b[j][i] = 1;
				}
			}
			else if(a==2||a==7){
				for(j=3;j<8;j++){
					if(j==5) continue;
					b[j][i] = 1;
				}
			}
			else if(a==3||a==8){
				for(j=3;j<8;j++){
					if(j==6) continue;
					b[j][i] = 1;
				}
			}
			else {
				for(j=3;j<7;j++){
					b[j][i] = 1;
				}
			}
			n -= c*a;
			c /= 10;
		}
		if(count) printf("\n");
		else count++;
		for(i=0;i<8;i++){
			for(j=0;j<5;j++){
				if(b[i][j] == 1) printf("%c",'*');
				else if(b[i][j] == 2) printf("%c",'=');
				else printf("%c",' ');
			}
			printf("\n");
		}
	}
	return 0;
}

C++: #include<iostream>

int main(){

	int n;
	while (std::cin >> n){

		char soro[8][5];
		for (int i = 0; i < 8; i++){
			for (int j = 0; j < 5; j++){
				soro[i][j] = '*';
			}
		}
		for (int i = 0; i < 5; i++)soro[2][i] = '=';

		for (int i = 4; i >= 0; i--){
			int mod = n % 10;

			if (mod == 0 || mod == 5)soro[3][i] = ' ';
			if (mod == 1 || mod == 6)soro[4][i] = ' ';
			if (mod == 2 || mod == 7)soro[5][i] = ' ';
			if (mod == 3 || mod == 8)soro[6][i] = ' ';
			if (mod == 4 || mod == 9)soro[7][i] = ' ';

			if (mod < 5)soro[1][i] = ' ';
			else soro[0][i] = ' ';

			n /= 10;
		}

		for (int i = 0; i < 8; i++){
			bool flg = false;
			for (int j = 0; j < 5; j++)if (soro[i][j] != ' ')flg = true;

			if (flg){
				for (int j = 0; j < 5; j++){
					std::cout << soro[i][j];
				}
				std::cout << std::endl;
			}
			else std::cout << std::endl;
		}
		std::cout << std::endl;
	}



}