i want to find the output of this code on copy but while i am doing i am unable to find and also i am using watch function but for this code that is also not working
kindly help me
You need to fix the indentation to see what the code is doing.
You just need to work thru it one step at a time. There's no logic to understand, just follow the steps as the computer would. When I was studying, it was called a "dry run", and we'd be expected (in an exam) to do it on paper.
Now at a glance I see a few non-standard things in the code, I guess it was written for Turbo C++. For now I'll let that pass.
I'd also suggest putting extra braces around the for loops and the if statement. The compiler doesn't care about them, but it may help a human reader to see what is the scope of the control statements.
One more thing I would do. Get rid of the confusing and hard-to-read variable name l. Again, the compiler doesn't care, but to a human reader it can be confusing to see expressions like l-c-1 and l/2