ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1591. Abstract Thinking

Why on this code stands out "Compilation error"?
Posted by Anix 18 Nov 2007 12:47
Thank's. VS6.0 has very stupid compiler :)

Edited by author 18.11.2007 21:28
Re: Why on this code stands out "Compilation error"?
Posted by Alias (Alexander Prudaev) 18 Nov 2007 13:26
when you submit your code you can use option
"reply to this email"

maybe you use Visual Studio 6.0 and it's stupid compiler
for (int i=0;i<k;i++) // there you define i
{
tmp*=n;
n--;
} // end of area where i is visible
for (i=1;i<=k;i++)
^^^^^^^^^^ i is undefined there
{
d*=i;
}

in c++ standart you can do such cicles
for (int i = 0; i < 4; i++) .....
for (int i = 0; i < 4; i++) .....

but stupid VS 6.0 compiler think that it is wrong
anyway you can do as this:

int i;
for (i = 0; i < 4; i++) ...
for (i = 0; i < 4; i++) ...

Edited by author 18.11.2007 13:27