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<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
#include<functional>
using namespace std;

int main(){
	string S,a[10] = {"* = ****","* =* ***","* =** **","* =*** *","* =****"," *= ****"," *=* ****"," *=** **"," *=*** *"," *=****"};
	for(int ds=0; cin>>S; ds++){
		if(ds!=0) puts("");
		while(S.size()<5) S = "0"+S;
		for(int i=0;i<8;i++){
			for(int j=0;j<S.size();j++){
				printf("%c",a[S[j]-'0'][i]);
			}puts("");
		}
	}
	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 == EOF) 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 <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
#include <climits>
#include <sstream>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;

char aba[8][5];

int abac(int n,int i){
	if(n>4){
		aba[0][i]=' ';
		aba[1][i]='*';
		n-=5;
	}else{
		aba[0][i]='*';
		aba[1][i]=' ';
	}
	aba[2][i]='=';
	for(int j=3;j<8;j++){
		if(j-3==n)aba[j][i]=' ';
		else aba[j][i]='*';
	}
}

main(){
	char num[6];
	while(cin>>num){
		int s=strlen(num);
		for(int i=0;i<5;i++){
			if(s-5+i<0)abac(0,i);
			else abac(num[s-5+i]-'0',i);
		}
		for(int i=0;i<8;i++){
			for(int j=0;j<5;j++){
				cout<<aba[i][j];
			}
			cout<<endl;
		}
	}
}

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

int main(){
    int n,i,j;
    i=0;
    while( cin >> n ){
        int f[5], s[5];
        if(i) cout << endl;
        for(i=4;i>=0;i--){
            f[i] = n%10/5;
            s[i] = n%5;
            n /= 10;
        }
        for(i=0;i<5;i++){
            if(!f[i]) cout << "*";
            else cout << " ";
        }
        cout << endl;
        for(i=0;i<5;i++){
            if(f[i]) cout << "*";
            else cout << " ";
        }
        cout << endl;
        cout << "=====" << endl;
        for(i=0;i<5;i++){
            for(j=0;j<5;j++){
                if(s[j]==i) cout << " ";
                else cout << "*";
            }
            cout << endl;
        }
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int a;
	while (cin >> a){
		int b[5] = { 0 };
		if (a < 10){
			b[4] = a;
		}
		else if (a < 100){
			b[4] = a % 10;
			a -= b[4];
			a /= 10;
			b[3] = a;
		}
		else if (a < 1000){
			b[4] = a % 10;
			a -= b[4];
			a /= 10;
			b[3] = a % 10;
			a -= b[3];
			a /= 10;
			b[2] = a;
		}
		else if (a < 10000){
			b[4] = a % 10;
			a -= b[4];
			a /= 10;
			b[3] = a % 10;
			a -= b[3];
			a /= 10;
			b[2] = a % 10;
			a -= b[2];
			a /= 10;
			b[1] = a;
		}
		else{
			b[4] = a % 10;
			a -= b[4];
			a /= 10;
			b[3] = a % 10;
			a -= b[3];
			a /= 10;
			b[2] = a % 10;
			a -= b[2];
			a /= 10;
			b[1] = a % 10;
			a -= b[1];
			a /= 10;
			b[0] = a;
		}
		for (int i = 0; i < 5; i++){
			if (b[i] < 5)cout << ' ';
			else cout << '*';
		}
		cout << endl;
		for (int i = 0; i < 5; i++) {
			if (b[i] < 5)cout << '*';
			else cout << ' ';
		}
		cout << endl;
		for (int i = 0; i < 5; i++) {
			cout << '=';
		}
		cout << endl;
		for (int i = 0; i < 5; i++) {
			if (b[i] % 5 == 0)cout << ' ';
			else cout << '*';
		}
		cout << endl;
		for (int i = 0; i < 5; i++) {
			if (b[i] % 5 == 1)cout << ' ';
			else cout << '*';
		}
		cout << endl;
		for (int i = 0; i < 5; i++) {
			if (b[i] % 5 == 2)cout << ' ';
			else cout << '*';
		}
		cout << endl;
		for (int i = 0; i < 5; i++) {
			if (b[i] % 5 == 3)cout << ' ';
			else cout << '*';
		}
		cout << endl;
		for (int i = 0; i < 5; i++) {
			if (b[i] % 5 == 4)cout << ' ';
			else cout << '*';
		}
		cout << endl;
	}

}

C++: // 2014/05/31 Tazoe

#include <iostream>
using namespace std;

int main()
{
	bool flg = false;

	while(true){
		int n;
		cin >> n;

		if(cin.eof())
			break;

		char A[8][5];
		for(int y=0; y<8; y++){
			for(int x=0; x<5; x++){
				if(y==2){
					A[y][x] = '=';
				}
				else{
					A[y][x] = '*';
				}
			}
		}

		for(int i=0; i<5; i++){
			switch(n%10){
			case 0:
				A[1][4-i] = A[3][4-i] = ' ';
				break;
			case 1:
				A[1][4-i] = A[4][4-i] = ' ';
				break;
			case 2:
				A[1][4-i] = A[5][4-i] = ' ';
				break;
			case 3:
				A[1][4-i] = A[6][4-i] = ' ';
				break;
			case 4:
				A[1][4-i] = A[7][4-i] = ' ';
				break;
			case 5:
				A[0][4-i] = A[3][4-i] = ' ';
				break;
			case 6:
				A[0][4-i] = A[4][4-i] = ' ';
				break;
			case 7:
				A[0][4-i] = A[5][4-i] = ' ';
				break;
			case 8:
				A[0][4-i] = A[6][4-i] = ' ';
				break;
			case 9:
				A[0][4-i] = A[7][4-i] = ' ';
				break;
			default:
				break;
			}

			n /= 10;
		}

		if(flg){
			cout << endl;
		}
		else{
			flg = true;
		}

		for(int y=0; y<8; y++){
			for(int x=0; x<5; x++){
				cout << A[y][x];
			}
			cout << endl;
		}
	}

	return 0;
}