|
|
back to boardWhy 13 test "CRASH" ?? #include <iostream> using namespace std; int main() { int n; int i; char s; char a[1001]; cin>>n;
for (i = 0; i<n*2; i++) cin>>a[i]; cin>>s; for (i=0; i<n*2; i++) {
if (s == a[i] && i % 2 == 0) cout<<a[i]<<a[i+1]<<endl; }
system("pause"); return 0; } Re: Why 13 test "CRASH" ?? Posted by AterLux 23 Apr 2011 02:56 a[1001] should be a[2000] at least; Re: Why 13 test "CRASH" ?? Thanks ))) |
|
|