What is the result of the following code execution?
 
public static void Main()
 { 
        int i, j, s = 0; 
        for (i = 0, j = 6; i < j; ++i, --j ) 
        {
         s += i; 
        }
         Console.WriteLine(s); 
}
 
Explanation
It is allowed to have more than one counter inside a loop.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes