One mistake I've found:
You have s[0] ... s[99].
string s[100],s1="";
However, when n=100, the program will use s[100].
for (int i=1;i<=n;i++)
{
do
{
cin >> s[i];
}
while (s[i].length()!=m);
}
Search found 5 matches
- Thu Mar 09, 2006 9:08 am
- Forum: Volume 101 (10100-10199)
- Topic: 10189 - Minesweeper
- Replies: 418
- Views: 124791
- Tue Aug 09, 2005 2:06 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10473 - Simple Base Conversion
- Replies: 46
- Views: 21137
- Tue Aug 09, 2005 1:28 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10889 - The Lost Gift
- Replies: 17
- Views: 8685
- Tue Aug 09, 2005 12:05 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10889 - The Lost Gift
- Replies: 17
- Views: 8685
Hope it helps...
Input:
Output of my AC program:
Input:
Code: Select all
3 4
6 2
66 55
0 0
Code: Select all
No. of black balls invalid
No. of black balls invalid
0 23
- Mon Aug 08, 2005 2:58 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10888 - Warehouse
- Replies: 19
- Views: 16681