simple array questions
in
Programming Questions
•
3 years ago
i am very new to processing, i am curious how to make a double array to show only 2 decimal places, right now its showing 12 places. heres the code
- void setup()
- {
- printLedger();
- }
- void printLedger()
- {
- double [] entry = {10.52, 1900.78, -234.78};
- for (int i = 0; i < entry.length; i++)
- {
- println(entry[i]);
- }
- }
1
