TOPIC

Wrong Answer (100%)

Leonardo Ferreira dos Santos asked 11 months ago

include include

using namespace std;

int main() { int max=5,i=0,j=0,n=0; int matriz[101][101]; cin>>max; while(max<=101&&max>=5&&max!=EOF&&max%2!=0) { for(i=0;i<=100;i++) { for(j=0;j<=100;j++) { matriz[i][j]=0; } } i=0; j=0; max=max-1; while(i<=max) { while(j<=max) { if(i==j) { matriz[i][j]=2; } if(i==(max-j)) { matriz[i][j]=3; } if(j==(max-i)) { matriz[i][j]=3; } if(i>=max/3&&i<=((max2)/3)+1) { if(j>=max/3&&j<=((max2)/3)+1) { matriz[i][j]=1; } } if(i==(max/2)) { if(j==(max/2)) { matriz[i][j]=4; } } j++; } j=0; i++; } i=0; for(i=0;i<=max;i++) { for(j=0;j<=max;j++) { cout<<matriz[i][j]; } cout<<endl; } max++; if(max==101) { return 0; } cin>>max; } return 0; }

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.