Language: C++

#include<iostream>
using namespace std;
int maun(){

	int parts,b,f,r,v;
	cin>>parts;
	for(int i = 0;i<parts;i++){
		cin>>b>>f>>r>>v;
		if(b==1){
			for(int j = 0;j<4;j++){
				if(f==j){
					for(int k = 0;k<10;k++){
						if(r==k){
							cout<<v;
						}else{
							cout<<0;
						}if(k==9){
							cout<<endl;
						}
					}
				}if(j==3){
					cout<<"##########"<<endl;
				}
			}
		}if(b==2){
			if(i==1){
				cout<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl;
				for(int j = 0;j<4;j++){
					if(f==j){
						for(int k = 0;k<10;k++){
							if(r==k){
								cout<<v;
							}else{
								cout<<0;
							}if(k==9){
								cout<<endl;
							}
						}
					}if(j==3){
						cout<<"##########"<<endl;
					}
				}
			}else if(i==2){
				for(int j = 0;j<4;j++){
					if(f==j){
						for(int k = 0;k<10;k++){
							if(r==k){
								cout<<v;
							}else{
								cout<<0;
							}if(k==9){
								cout<<endl;
							}
						}
					}if(j==3){
						cout<<"##########"<<endl;
					}
				}
			}
		}if(b==3){
			if(i==1){
				cout<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"##########"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"##########"<<endl;
				for(int j = 0;j<4;j++){
					if(f==j){
						for(int k = 0;k<10;k++){
							if(r==k){
								cout<<v;
							}else{
								cout<<0;
							}if(k==9){
								cout<<endl;
							}
						}
					}if(j==3){
						cout<<"##########"<<endl;
					}
				}
			}if(i==2){
				cout<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"##########"<<endl;
				for(int j = 0;j<4;j++){
					if(f==j){
						for(int k = 0;k<10;k++){
							if(r==k){
								cout<<v;
							}else{
								cout<<0;
							}if(k==9){
								cout<<endl;
							}
						}
					}if(j==3){
						cout<<"##########"<<endl;
					}
				}
			}if(i==3){
				for(int j = 0;j<4;j++){
					if(f==j){
						for(int k = 0;k<10;k++){
							if(r==k){
								cout<<v;
							}else{
								cout<<0;
							}if(k==9){
								cout<<endl;
							}
						}
					}if(j==3){
						cout<<"##########"<<endl;
					}
				}
			}
		}if(b==4){
			if(i==1){
				cout<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"##########"<<endl;
				cout<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"##########"<<endl;
				cout<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"##########"<<endl;
				for(int j = 0;j<4;j++){
					if(f==j){
						for(int k = 0;k<10;k++){
							if(r==k){
								cout<<v;
							}else{
								cout<<0;
							}if(k==9){
								cout<<endl;
							}
						}
					}if(j==3){
						cout<<"##########"<<endl;
					}
				}
			}if(i==2){
				cout<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"##########"<<endl;
				cout<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"##########"<<endl;
				for(int j = 0;j<4;j++){
					if(f==j){
						for(int k = 0;k<10;k++){
							if(r==k){
								cout<<v;
							}else{
								cout<<0;
							}if(k==9){
								cout<<endl;
							}
						}
					}if(j==3){
						cout<<"##########"<<endl;
					}
				}
			}if(i==3){
				cout<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"0 0 0 0 0 0 0 0 0 0"<<endl<<"##########"<<endl;
				for(int j = 0;j<4;j++){
					if(f==j){
						for(int k = 0;k<10;k++){
							if(r==k){
								cout<<v;
							}else{
								cout<<0;
							}if(k==9){
								cout<<endl;
							}
						}
					}if(j==3){
						cout<<"##########"<<endl;
					}
				}
			}if(i==4){
				for(int j = 0;j<4;j++){
					if(f==j){
						for(int k = 0;k<10;k++){
							if(r==k){
								cout<<v;
							}else{
								cout<<0;
							}if(k==9){
								cout<<endl;
							}
						}
					}if(j==3){
						cout<<"##########"<<endl;
					}
				}
			}
		}
	}
	return 0;

}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status