Since we are no homework service, let me instead give you some pointers for becoming able to do it yourself (you do want to learn C, right? 🙂). By the way, you might want to fix your tags. This question should not be tagged as CSharp or CPP. They are different languages. Also as a note: developing a program is literally the art of solving problems, so you should try a bit harder than that. In effect, you did not even try to solve anything in your code or look at the problems at hand. Where is your algorithm?
When we have a requirement we have to implement, we usually split the problem up into smaller pieces, which feel do-able. In your case, the initial requirement is "calculate the check digit and output the formatted credit card number". Doing the first split is simple, because there is a connective word in the sentence. Now we have two tasks:
Your above code solves part of the second problem, but the first one is missing entirely. I won't tell you to solve each problem separately or in a specific order, because by doing some tasks in parallel, you get early results, which results in good feedback!
However, these two problems are still rather big and hard to implement. Let's split them up some more by thinking about the problem! Unfortunately, the given description for the algorithm is bad imho, which is why I simply googled it and found a very nice description and figure, which immediately made it clear to me how the calculation works:

Basically, for every odd number, we have to double that number and then add each single digit which forms the whole number up for a total number. Every even number is just added. From both, we calculate the total and try to see what we have to add to get the next multiple of 10. That's the check digit. With this idea, we can easily split the first problem into more smaller problems.
As for the second problem, you already did half (output all the digits of the credit card number). So the other half would be formatting the output. With the new smaller problems, we now have to solve the following tasks:
Imho, all steps above look pretty simple... if you know a thing or two about programmer's math. Your teacher tries to explain that important part with a stupid example in your task above. If I didn't know what they mean, I probably wouldn't get it.
By assigning x = 13/4; the variable x gets the value 3
What they mean is: x is an integer, so it cannot hold decimals. All decimals are just cut off. 13 / 4 equals 3.25, but then it is squeezed into an integer variable, so it becomes 3. Another example would be 9 / 2 becomes 4 when stored in an integer variable.
By assigning x = 13% 4; the variable x gets the value 1
% in C is the modulo operator. A very rough description is that it divides the first parameter by the second one and then outputs the rest instead of putting it into the decimal part of the number. 13 % 4 means that the operator finds out that 12 is the closest multiple of 4 smaller than 13 and then calculates 13 - 12 to output a result of 1. Another example would be 11 % 3 equals 2 (because 3 * 3 equals 9 and we need another 2 for 11). Note: There also is a "remainder" operator, which does the same except when it comes to negative numbers, which we don't have, so don't worry about it (just know that it exists).
How are the above tips even useful? Remember the step where we have to add up the single digits of a number? How would you go about extracting 2 and 5 from the number 25? Let's take a look at the first tip: an integer cuts of all decimals. What would happen if we divide the number by 10 and then squeeze the result into an integer? The solution (I hope you think about this before just reading on!) is that we get the first digit. If the number was smaller than 10 to begin with, the result is 0, so that's ok, too! For the second digit, we need the second tip. What would happen if we calculate the number modulo 10? The solution is (you really should think about it and make sure you actually understand how this works!) that we get the second digit, because we do maths in a decimal system. Decimal means "based on ten", by the way, which is why we use 10 for extraction.
Neat! That was the hard part, the rest is just adding everything up and.. oh no! How do we get the difference to the next multiple of 10. You can solve this problem easily with one modulo operation and one subtraction. If you understood everything above, this one should be simple.
Now, for the formatting, you can either do the tedious job to feed printf()'s parameters with every single piece and use its formatting capabilities, or you just loop over your array of digits and use the counter, which prints an additional whitespace every time counter modulo 4 equals 0 - except for the first occurence, which would be at index 0.
I hope you are now able to get your homework done and have less trouble with the next assignment.