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 <cstdio>
#include <iostream>
#include <string>
#include <map>
#define rep(i, n) for (int i=0; i<n; i++)
using namespace std;

string inp, ans[8];
map<char, string> m;

int main(void)
{
	m['0'] = "* = ****";
	m['1'] = "* =* ***";
	m['2'] = "* =** **";
	m['3'] = "* =*** *";
	m['4'] = "* =**** ";
	m['5'] = " *= ****";
	m['6'] = " *=* ***";
	m['7'] = " *=** **";
	m['8'] = " *=*** *";
	m['9'] = " *=**** ";

	while (cin >> inp)
	{
		ans[5] = "        ";
		ans[6] = "        ";
		ans[7] = "        ";

		while (inp.length() < 5) inp = "0" + inp;
		rep(i, 5) ans[i] = m[inp[i]];
		//rep(i, 5) cout << ans[i] << endl;
		rep(i, 5)
		{
			rep(j, 8)
			{
				if (j < 5 && i < j) continue;
				char w = ans[i][j];
				ans[i][j] = ans[j][i];
				ans[j][i] = w;
			}
		}
		rep(i, 8) cout << ans[i] << endl;
		cout << endl;
	}
	
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	char ball[10][8] = {{'*',' ','=',' ','*','*','*','*'},
											{'*',' ','=','*',' ','*','*','*'},
											{'*',' ','=','*','*',' ','*','*'},
											{'*',' ','=','*','*','*',' ','*'},
											{'*',' ','=','*','*','*','*',' '},
											{' ','*','=',' ','*','*','*','*'},
											{' ','*','=','*',' ','*','*','*'},
											{' ','*','=','*','*',' ','*','*'},
											{' ','*','=','*','*','*',' ','*'},
											{' ','*','=','*','*','*','*',' '}};
	string i;
	while(cin >> i,!cin.eof()){
	for(int j=0;j<5-i.size();j++)i = '0' + i;
	cout << i << endl;
	for(int k=0;k<8;k++){
		for(int l=0;l<5;l++){
			cout << ball[i[l]-'0'][k];
		}
		cout << endl;
	}
	cout << endl;
	}
}

C++: #include <iostream>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,b) FOR(i,0,b)
#define PB push_back
#define MP make_pair
int main(){
  string data[10]={"* = ****","* =* ***","* =** **","* =*** *","* =**** "," *= ****"," *=* ***"," *=** **"," *=*** *"," *=**** "};
  string s;
  int n=0;
  while(cin>>s){
    if(n!=0)cout<<endl;
    n=1;
    string ans[5];
    for(int i=0;i<5-s.size();i++)ans[i]="* = ****";
    int k=5-s.size();
    for(int i=0;i<s.size();i++){
      ans[k]=data[s[i]-'0'];
      k++;
    }
    for(int i=0;i<8;i++){
      for(int j=0;j<5;j++){
        cout<<ans[j][i];
      }
      cout<<endl;
    }
  }
}

C++: #include <iostream>
#include <string>
#include <cstring>
#include <cmath>

using namespace std;

int main(void){
	int n;
	bool first = true;
	
	while(cin >> n){
		int d[5];
		
		for(int i=4;i>=0;i--){
			d[4-i] = (int)(n / pow(10, i)) % 10;
		}
		
		if(!first) cout << endl;
		
		for(int i=0;i<8;i++){
			for(int j=0;j<5;j++){
				if(i == 0){
					if(d[j] / 5 == 0){
						cout << "*";
					}else{
						cout << " ";
					}
				}else if(i == 1){
					if(d[j] / 5 == 1){
						cout << "*";
					}else{
						cout << " ";
					}
				}else if(i == 2){
					cout << "=";
				}else if(i == 3){
					if(d[j] % 5 == 0){
						cout << " ";
					}else{
						cout << "*";
					}
				}else if(i == 4){
					if(d[j] % 5 == 1){
						cout << " ";
					}else{
						cout << "*";
					}
				}else if(i == 5){
					if(d[j] % 5 == 2){
						cout << " ";
					}else{
						cout << "*";
					}
				}else if(i == 6){
					if(d[j] % 5 == 3){
						cout << " ";
					}else{
						cout << "*";
					}
				}else if(i == 7){
					if(d[j] % 5 == 4){
						cout << " ";
					}else{
						cout << "*";
					}
				}
			}
			cout << endl;
			first = false;
		}
	}
}

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

string soroban[8] = {"*****     ", "     *****", "==========",
                     " **** ****", "* **** ***", "** **** **",
                     "*** **** *", "**** **** "};

int main() {
    string s;
    int count = 0;
    while (cin >> s) {
        int diff = 5 - s.size();
        string t;
        for (int i = 0; i < diff; i++) {
            t.push_back('0');
        }
        t += s;

        if (count) cout << endl;
        for (int i = 0; i < 8; i++) {
            for (int j = 0; j < 5; j++) {
                cout << soroban[i][t[j] - '0'];
            }
            cout << endl;
        }
        count++;
    }
}

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();

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

char y=str[i-t];


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

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

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

}
	
}

for(int i=0;i<9;i++){
for(int j=0;j<5;j++)
cout<<ch[i][j];

cout<<endl;
}
}
return 0;
}

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

int main() {
	string sa;
	while (cin >> sa) {
		char so[5][8];
		int a = sa.size();

		for (int i = 0;i < 5;i++) {
			for (int j = 0;j < 8;j++) {
				if (j == 1 || j == 3)so[i][j] = ' ';
				else if (j == 2) { so[i][j] = '='; }
				else so[i][j] = '*';
			}
		}
	 reverse(sa.begin(), sa.end());
	 string s = sa;

		for (int i =4;i>=5-a;i--) {
			if(s[4-i]>='5'){
				so[i][0] = ' ';
				so[i][1] = '*';
			}
			else {
				so[i][0] = '*';
				so[i][1] = ' ';
			}

			if ((s[4-i] - '0') % 5 == 0) {
				so[i][3] = ' ';
				for (int ia = 4;ia <= 7;ia++)so[i][ia] = '*';
			}
			else if ((s[4-i] - '0') % 5 == 1) {
				for (int j = 3;j <= 7;j++) {
					if (j == 4)so[i][j] = ' ';
					else { so[i][j] = '*'; }
				}
			}
			else if ((s[4-i] - '0') % 5 == 2) {

				for (int j = 3;j <= 7;j++) {
					if (j == 5)so[i][j] = ' ';
					else so[i][j] = '*';
				}
			}
			else if ((s[4-i] - '0') % 5 == 3) {
				for (int j = 3;j <= 7;j++) {
					if (j == 6)so[i][j] = ' ';
					else so[i][j] = '*';
				}
			}
			else {
				for (int j = 3;j <= 7;j++) {
					if (j == 7)so[i][j] = ' ';
					else so[i][j] = '*';
				}
			}
		}
		for (int i = 0;i < 8;i++) {
			for (int j = 0;j < 5;j++) {
				cout << so[j][i];
				if (j == 4)cout << endl;
			}
		}
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

signed main(){
int a;
int b=0;
while(cin>>a){
	int k=0;
   bool s[5][7]{};
   if(b)cout<<endl;
   for(int c=10000;c!=0;c/=10,k++){
   	int d=a/c;
   	if(d>4)s[k][1]=true;
   	else s[k][0]=true;
   	for(int h=0;h<5;h++){
   		if(d%5!=h)s[k][h+2]=true;
   	}
   	a-=d*c;
   }
   for(int x=0;x<2;x++){
   	for(int y=0;y<5;y++){if(s[y][x])printf("*");else printf(" ");}
   	printf("\n");
   }
   puts("=====");
   for(int x=2;x<7;x++){
   	for(int y=0;y<5;y++){if(s[y][x])printf("*");else printf(" ");}
   	printf("\n");
   }
   b++;
}
}