97求助!
查看原帖
97求助!
766790
Ackid楼主2025/1/6 10:11
#include<bits/stdc++.h>
using namespace std;
int n,a[11];
int main(){
	cin>>n;
	int i=1;
	while(n!=0){
		a[i]=n%10;
		n/=10;
		i++;
	}	
	for(int k=1;k<=5;k++){
		for(int j=i-1;j>=1;j--){
			if(a[j]==0){
				if(k==1){
					cout<<".....";
				}else if(k==2){
					cout<<".***.";
				}else if(k==3){
					cout<<".***.";
				}else if(k==4){
					cout<<".***.";
				}else if(k==5){
					cout<<".....";
				}
			}else if(a[j]==1){
				if(k==1){
					cout<<"****.";
				}else if(k==2){
					cout<<"****.";
				}else if(k==3){
					cout<<"****.";
				}else if(k==4){
					cout<<"****.";
				}else if(k==5){
					cout<<"****.";
				}
			}else if(a[j]==2){
				if(k==1){
					cout<<".....";
				}else if(k==2){
					cout<<"****.";
				}else if(k==3){
					cout<<".....";
				}else if(k==4){
					cout<<".****";
				}else if(k==5){
					cout<<".....";
				}
			}else if(a[j]==3){
				if(k==1){
					cout<<".....";
				}else if(k==2){
					cout<<"****.";
				}else if(k==3){
					cout<<".....";
				}else if(k==4){
					cout<<"****.";
				}else if(k==5){
					cout<<".....";
				}
			}
		}
		cout<<endl;
	}
	return 0;
}
2025/1/6 10:11
加载中...