Search found 2 matches

by s.mahzabin
Sat Mar 08, 2014 6:11 am
Forum: Volume 4 (400-499)
Topic: 490 - Rotating Sentences
Replies: 212
Views: 21345

Re: 490 - Rotating Sentence

I'm getting WA. :( Here's my code.. What's wrong with it? :-? #include<stdio.h> #include<string.h> int main() { char s[102][102],found; int i,j,len,maxl; for(i = 0; i < 102;++i) { for(j = 0; j < 102; ++j) s[i][j] = ' '; } for(i = maxl = 0;gets(s[i]);++i) { if(strlen(s[i]) > maxl) maxl = strlen(s[i])...
by s.mahzabin
Mon Aug 27, 2012 12:41 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 70418

Re: 10189 - Minesweeper

why am I getting wrong answer? :-? :( this is my code- #include<stdio.h> #define MAX 20000 int main() { char c, field[MAX]; int m,n,i,x,j,mine[MAX],k; for(x = 1; (scanf("%d%d", &m, &n) != 2 ||(m != 0 && n != 0)); ++x) { i = j = 0; while(i < (m * n)) { c = getchar(); if( c == '.') field[i++] = '0'; e...

Go to advanced search