We propose an economics-oriented cloud computing resources allocation strategy with the use of game theory. Then we develop a resource allocation algorithm named NCGRAA (noncooperative game resource allocation algorithm) to search the Nash equilibrium solution that makes the utility of various resource providers achieve optimum. We also propose an algorithm named BGRAA (bargaining game resource allocation algorithm) to further increase the overall revenue with the constraints of efficiency and fairness. Based on numerical results, we discuss the influence of NCGRAA and BGRAA for the utility of resource on the system performance. It shows that the choice of parameters of the two algorithms is significant in improving the system performance and converging to the Nash equilibrium and Nash bargaining.