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()
		}
		fmt.Println()
	}
}

C++: #include<stdio.h>

int main(void){
	int n,i,j;
	int joudan[5],gedan[5];
	int data[7][5];

	while(scanf("%d",&n)!=EOF){

		for(i=0;i<7;i++)
			for(j=0;j<5;j++)
				data[i][j]=1;

		for(i=4;i>=0;i--){
			joudan[i]=(n%10)/5;
			gedan[i]=(n%10)%5;
			n/=10;
		}
		  for(i=0;i<5;i++){//上段の判定
			  if(joudan[i]==1)
				  data[0][i]=0;
			  else 
				  data[1][i]=0;
		  }

		 for(i=0;i<5;i++){
			  if(gedan[i]==0)
				 data[2][i]=0;
			  else if(gedan[i]==1)
				  data[3][i]=0;
			  else if(gedan[i]==2)
				  data[4][i]=0;
			  else if(gedan[i]==3)
				  data[5][i]=0;
			  else if(gedan[i]==4)
				  data[6][i]=0;
		  }
		for(i=0;i<2;i++)
			for(j=0;j<5;j++){
				if(data[i][j]==1)
					printf("*");
				else
					printf(" ");
				if(j==4) printf("\n");
			}

		for(i=0;i<5;i++){
			printf("=");
			if(i==4) printf("\n");
		}

		for(i=2;i<7;i++)
			for(j=0;j<5;j++){
				if(data[i][j]==1)
					printf("*");
				else
					printf(" ");
				if(j==4) printf("\n");
			}
			printf("\n");
	}
	return 0;
}

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

int main() {
	
	string s;
	string ab[10]={"* = ****","* =* ***","* =** **","* =*** *","* =**** "," *= ****"," *=* ***"," *=** **"," *=*** *"," *=**** "};
	string res[8];
	
	while(cin>>s){
		
		for(int i=0;i<8;++i)res[i]="";
		
		int l=s.length();
		
		for(int i=0;i<5-l;++i){
			s = "0" + s;
		}
		
		for(int j=0;j<5;++j){
			for(int i=0;i<8;++i){
				res[i] += ab[s[j]-'0'][i];
			}
		}
		for(int i=0;i<8;++i){
			cout<<res[i]<<endl;
		}
		cout<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
#include <string>
using namespace std;
 
int main(){
    string s;
    string soro[10] = {"* = ****",
                        "* =* ***",
                        "* =** **",
                        "* =*** *",
                        "* =**** ",
                        " *= ****",
                        " *=* ***",
                        " *=** **",
                        " *=*** *",
                        " *=**** "};
    bool flag = true;
    while(cin >> s){
        vector<char> c;
        for(int i=0;i<5-s.size();i++){
            c.push_back('0');
        }
        for(int i=0;i<s.size();i++){
            c.push_back(s[i]);
        }
        if(flag){
            flag = false;
        }else{
            cout << endl;
        }
 
        for(int i=0;i<8;i++){
            for(int j=0;j<5;j++){
                cout << soro[c[j]-'0'][i];
            }
            cout << endl;
        }
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

char table[10][10] = {

  "* = ****",
  "* =* ***",
  "* =** **",
  "* =*** *",
  "* =**** ",
  " *= ****",
  " *=* ***",
  " *=** **",
  " *=*** *",
  " *=**** "

};

int main() {

  int n;

  char abacus[10][10];
  int digit[5];
  
  while(cin >> n) {

    digit[0]=n/100000;

    digit[1]=n%10000/1000;

    digit[2]=n%1000/100;

    digit[3]=n%100/10;

    digit[4]=n%10;

    for(int i=0;i<5;i++) {

      for(int j=0;j<8;j++) {

	abacus[i][j]=table[digit[i]][j];

      }

    }

    for(int i=0;i<8;i++) {

      for(int j=0;j<5;j++) {

	cout << abacus[j][i];

      }

      cout << endl;

    }

    cout << endl;

  }

  return 0;

}

C++: #include <vector>
#include <algorithm>
#include <iostream>
#include <functional>
#include <string>

using namespace std;

int main() {
    int n = 0;
    int N[5] = {0};
   
    for (int k = 0; k < 2; k++) {
         cin >> n;
    
    N[0] = n / 10000;
    n %= 10000;
    N[1] = n / 1000;
    n %= 1000;
    N[2] = n / 100;
    n %= 100;
    N[3] = n / 10;
    n %= 10;
    N[4] = n;
    
        for(int i = 0; i < 8; i++) {
            for (int j = 0; j < 5; j++) {
                if(i == 0) {
                    if (N[j] < 5) cout << "*";
                    else cout << " ";
                }
                if(i == 1) {
                    if (N[j] < 5) cout << " ";
                    else cout << "*";
                }

                if(i == 2) cout << "=";

                if(i == 3) {
                    if (N[j] > 4) N[j] -= 5;
                    if (N[j] != 0) cout << "*";
                    else cout << " ";
                }

                if(i == 4) {
                    if (N[j] != 1) cout << "*";
                    else cout << " ";
                }

                if(i == 5) {
                    if (N[j] != 2) cout << "*";
                    else cout << " ";
                }
                if(i == 6) {
                    if (N[j] != 3) cout << "*";
                    else cout << " ";
                }
                if(i == 7) {
                    if (N[j] != 4) cout << "*";
                    else cout << " ";
                }

                if (j == 4) cout << "\n";
            }
        }
        cout << "\n";
    }
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main()
{
	char s[6], r[5][8], d;
	int n, i, j, c;
	while (1)
	{
		cin >> n;
		if (cin.eof())
		{
			cout << '\b';
			break;
		}
		sprintf(s, "%05d", n);
		for (i = 0; i < 5; i++)
		{
			d = (char)s[i];
			c = atoi(&d);
			if (c < 5)
			{
				r[i][0] = '*';
				r[i][1] = ' ';
			}
			else
			{
				r[i][0] = ' ';
				r[i][1] = '*';
			}
			r[i][2] = '=';
			for (j = 3; j < 8; j++)
			{
				if (c != j-3 && c != j+2)
					r[i][j] = '*';
				else
					r[i][j] = ' ';
			}
		}
		for (i = 0; i < 8; i++)
		{
			for (j = 0; j < 5; j++)
			{
				cout << r[j][i];
			}
			cout << endl;
		}
		cout << endl;
	}
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include <stdio.h>
#include <ctype.h>
#include <string>
#include <iostream>
#include <vector>
#include <stack>
#include <fstream>
#include <sstream>
#include <queue>
#include <exception>
#include <cmath>
#include <numeric>
#include <map>
#include <algorithm>
#include <bitset>
#include <set>
#include <functional>

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)

using namespace std;
typedef long long int lint;

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

bool AOJ0128(bool flag)
{
	int n;
	if (!(cin >> n)) return false;

	char pic[8][5] = { 0 };
	RREP(j, 5) {
		int m = n % 10;
		REP(i, 8) {
			pic[i][j] = abacus[m][i];
		}
		n /= 10;
	}

	if (flag) cout << endl;

	REP(i, 8) {
		REP(j, 5) {
			cout << pic[i][j];
		}
		cout << endl;
	}

	return true;
}

int main()
{
	bool flag = false;
	while (AOJ0128(flag)) {
		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]={"* = ****","* =* ***","* =** **","* =*** *","* =**** "," *= ****"," *=* ***"," *=** **"," *=*** *"," *=**** "};
	cin>>n;
	while(n!=EOF){
		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;
	cin>>n;
	}
	return 0;
}