Now I compile it in my computer it works fine and even in the results of the CPTTRN 1 judge thing it shows exactly the same thing in expected result and your result then why does it keep saying wrong answer ?????? what is this I cant figure it out
include
int main(void) {
int t,f;
unsigned int line,col;
int i,j,flag,isEven;
scanf("%d",&t);
for(f=1;f<=t;f++){
scanf("%u",&line);
scanf("%u",&col);
if(line == col)
isEven = 1;
else
isEven = 0;
flag=0;
for(i=0;i<line;i++){
for(j=0;j<col;j++){
if(flag == 0){
printf("*");
flag = 1;
}
else{
printf(".");
flag = 0;
}
}
printf("\n");
if(isEven == 1){
if(flag == 0)
flag =1;
else
flag =0;
}
}
printf("\n");
}
return 0;
}
created
last reply
- 4
replies
- 814
views
- 3
users