Proving/solving this Program Code?

dualshock03

Well-known member
Joined
Jan 28, 2007
Messages
105
Programming Experience
1-3
need help with this...

How to prove the following program if it is correct or with no errors.. using some kind of BNF solving...

problem program:

{n>0}

count = n;
sum > sum + count;
while count <> 0 do
sum = sum + count;
count = count - 1;
end

{sum = 1+2+...+n}
 
Back
Top