Printing the value only once to Serial Monitor

Please edit your post to add code tags, as instructed in "How to use this forum".

Please make changes so that totalLitres value will be displayed once after calculating the whole value and repost the code.

Post payment first.