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

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

int main(){
string str;

char ch[10][6];
char n1[10]="* =* ***";
char n2[10]="* =** **";
char n3[10]="* =*** *";
char n4[10]="* =**** ";
char n5[10]=" *= ****";
char n6[10]=" *=* ***";
char n7[10]=" *=** **";
char n8[10]=" *=*** *";
char n9[10]=" *=**** ";
char n0[10]="* = ****";
char nn[10];

while(cin>>str){
int t=5-str.size();
bool f=true;

for(int i=0;i<5;i++){
	if(i<t){		
	for(int j=0;j<8;j++)
	nn[j]=n0[j];
	f=false;
}
	else{

char y=str[i-t];


if(y=='0'){
	for(int j=0;j<8;j++)
	nn[j]=n0[j];
}
else if(y=='1'){
	for(int j=0;j<8;j++)nn[j]=n1[j];
}
else if(y=='2'){
	for(int j=0;j<8;j++)nn[j]=n2[j];
}
else if(y=='3'){
	for(int j=0;j<8;j++)nn[j]=n3[j];
}
else if(y=='4'){
	for(int j=0;j<8;j++)nn[j]=n4[j];
}
else if(y=='5'){
	for(int j=0;j<8;j++)nn[j]=n5[j];
}
else if(y=='6'){
	for(int j=0;j<8;j++)nn[j]=n6[j];
}
else if(y=='7'){
	for(int j=0;j<8;j++)nn[j]=n7[j];
}
else if(y=='8'){
	for(int j=0;j<8;j++)nn[j]=n8[j];
}
else if(y=='9'){
	for(int j=0;j<8;j++)nn[j]=n9[j];
}
	if(y!='9'&&y!='4')f=false;
	}
	
for(int j=0;j<8;j++){

ch[j][i]=nn[j];

}
	
}
int w=8;
	if(f==true)w=7;
for(int i=0;i<w;i++){
for(int j=0;j<5;j++)
cout<<ch[i][j];

cout<<endl;
}
cout<<endl;
}
return 0;
}

C++: #include <iostream>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
	int digit[5];
	int view[5];
	string s;
	int c = 0;
	while(cin >> s){
		if(c++)cout << endl;
		rep(i,5)digit[i]=0;
		rep(i,s.length()){
			digit[5-s.length()+i] = s[i]-'0';
		}
		rep(i,5)
			if(digit[i]<5)cout << "*";
			else cout << " ";
		cout << endl;
		rep(i,5)
			if(digit[i]>=5)cout << "*";
			else cout << " ";
		cout << "\n=====\n";
		rep(i,5){
			view[i] = digit[i]%5;
		}
		rep(i,5){
			rep(j,5){
				if(view[j]--)cout << "*";
				else cout << " ";
			}
			cout << endl;
		}
	}
}