cho em hỏi sao hàm computeCoin(1, number, amountLeft) lại thực hiện trước hàm computeCoin(25, number, amountLeft)
code:
#include <iostream>
using namespace std;
int computeCoin(int coinValue, int& number, int& amountLeft);
int main()
{
int amountLeft=1, number = 0;
char tmp;
do
{
cout << "Enter amount of cents: ";
cin >> amountLeft;
cout << computeCoin(25, number, amountLeft) << " quarter(s) " << computeCoin(10, number, amountLeft)
<< " dime(s) and " << computeCoin(1, number, amountLeft) << " penny(pennies)" << endl;
cout << "Do you wanna continute? (y/n)" << endl;
cin >> tmp;
}
while (tmp == 'y' || tmp == 'Y');
return 0;
}
int computeCoin(int coinValue, int& number, int& amountLeft)
{
number = amountLeft/coinValue;
amountLeft = amountLeft - number*coinValue;
return number;
}
p/s: nếu có ng hỏi vấn đề này trước rồi thì em sr, tại em nhìn qua 1 số topic rồi nhưng chưa có 
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?