Your instinct that it's too long and not efficient is correct. Think about what the code is doing. There is a series of if/else if conditions. Most, perhaps all, are unnecessary.
Consider this. You start with a number x to convert to coins. Instead of testing with an if condition, just apply the calculation to it. If it is >= 25, then determine how many quarters are there with the modulo operation. Next, subtract the value of the quarters from x. (btw, your formula for this is incorrect) and store the result back in x. If x is less than 25, do the same thing, except that it will leave x unchanged and produce a count of 0 quarters, which you want anyways. The point is that you run the same operations, no matter what the value is in x - there's no need to test whether it's >= 25.
This leaves the remaining change in x. Just execute the same process for dimes and then nickels. You could also do it for pennies, but the penny count will simply be whatever is left.
As a side note, some suggestions to improve your coding style.
You have very simple variable names - x, c1, c2, m, etc. Single letter and very short variable names should be avoided, except for simple counters in for loops (usually, i, j, k). They make code very difficult to read and understand, particularly when there are no comments in the code. Instead, use short but descriptive names, like change, quarters, dimes, nickels, pennies, coins, etc.
Comments are a good thing. It would be appropriate to add comments like
// calculate quarters and so on to describe what a given section of code is supposed to do. Don't make people guess what the code is doing in a particular section. (Especially yourself when you come back to read it in 6 months!)
Whitespace is good, but too much can be as bad as too little. Avoid extra blank lines (i.e., 2 or 3 blank lines where 1 is sufficient) and keep your indents at a standard size, like 4 spaces.
There's a tool called style50. It checks spacing, blank lines, indents, variable names, etc. Use it until your code produces very few suggestions from style50. It will be well worth getting it right while you're in the early stages of learning to program.
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)