Table:
|  |  | Fiscal Year Ended August 31, |  |
| --- | --- | --- | --- |
|  | 2019 | 2018 | 2017 |
| Net cash provided by (used in) operating activities | $1,193,066 | $(1,105,448) | $(1,464,085) |
| Net cash (used in) provided by investing activities | (872,454) | 1,240,914 | 2,141,263 |
| Net cash used in financing activities | (415,772) | (47,044) | (404,546) |
| Effect of exchange rate changes on cash and cash equivalents | 554 | (20,392) | 5,228 |
| Net (decrease) increase in cash and cash equivalents | $(94,606) | $68,030 | $277,860 |
Paragraphs:
Cash Flows
The following table sets forth selected consolidated cash flow information (in thousands):
Operating Activities Net cash provided by operating activities during the fiscal year ended August 31, 2019 was primarily due to increased accounts payable, accrued expenses and other liabilities, decreased inventories and non-cash expenses, partially offset by increased contract assets and accounts receivable. The increase in accounts payable, accrued expenses and other liabilities is primarily due to the timing of collections on accounts receivable sold under the securitization programs and the timing of purchases and cash payments. The decrease in inventories is primarily due to the adoption of ASU 2014-09 and the reclassification to contract assets for revenue recognized for over time customers, partially offset by an increase in inventories to support expected sales levels in the first quarter of fiscal year 2020. The increase in contract assets is due to the adoption of ASU 2014-09 and the timing of revenue recognition for over time customers. The increase in accounts receivable is primarily driven by the amended and new securitization programs and higher sales and timing of collections.
Investing Activities Net cash used in investing activities during the fiscal year ended August 31, 2019 consisted primarily of capital expenditures principally to support ongoing business in the DMS and EMS segments and expenditures for assets acquired in connection with the initial and second closings of the acquisition of certain assets of JJMD, partially offset by proceeds and advances from the sale of property, plant and equipment and cash receipts on sold receivables under the asset-backed securitization programs.
Financing Activities Net cash used in financing activities during the fiscal year ended August 31, 2019 was primarily due to: (i) payments for debt agreements, (ii) the repurchase of our common stock, (iii) dividend payments and (iv) treasury stock minimum tax withholding related to vesting of restricted stock. Net cash used in financing activities was partially offset by: (i) borrowings under debt agreements and (ii) net proceeds from the exercise of stock options and issuance of common stock under the employee stock purchase plan.
Question:
What was the change in Net cash provided by (used in) operating activities between 2018 and 2019?