Perhaps you meant to say that you're supposed to print a sequence, presumably of variable length? If so, one simple solution is to save the initial number in a separate variable, then after using the loop to print the sequence other than the last number, you print the initial number again.
Of course, if the requirement is really for you to always print the sequence 5 10 15 20 25 30 5, then just save the trouble and write:
Code:
printf("5 10 15 20 25 30 5\n");
(This follows from the programming dictum: do the simplest thing that could possibly work.)