Some have added that there is also a cost to handling cash payment (the counting, transporting, etc)
I would like to point out that once a business has decided to accept cash and assume those costs, they are sort of fixed costs. The counting and handling process does not get more expensive depending on how much cash was counted/collected.
Whereas the credit card fees do rise with sales as they are usually percentage based.
So unless a business goes cashless, then there is not really an additional cost to accepting cash.