Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Cant find the mistake....
i, k, S, y, n:real;
write ('Unesi krajnji broj: ');
for i:=1 to n do
for i:=1 to 10 do
if (i=n) then
if (y=n) then
writeln ('S iznosi', S:2:2);
This is my program which calculate something like that...or should be..:)
1/1 - 1/2 + 1/3 - 1/4 + 1/5 - 1/6 + 1/7 - 1/8... +- 1/n...
But i cant find out why it sais that for loop (only one) is not good....