Loops/Downward for
< Loops
Write a for loop which writes a countdown from 10 to 0.
Loops/Downward for
You are encouraged to solve this task according to the task description, using any language you may know.
You are encouraged to solve this task according to the task description, using any language you may know.
C++
<cpp> for(int i = 10; i >= 0; --i)
std::cout << i << "\n";
</cpp>
Pascal
<pascal> for i := 10 downto 0 do
writeln(i);
</pascal>