6

.odt

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

145 X6485

Subject

Computer Science

Date

Dec 6, 2023

Type

odt

Pages

1

Uploaded by Ryanjordanl on coursehero.com

PARTICIPATION acTviTy 6.2.3: Formatting floating point outputs using printfi Whatis the output from the following print statements, assuming float myFloat = 45.1342F; 1) System.out.printf("%+.5F", myFloat); +4513420 / B3 oo 2) System.out.printf("%.3e" myFloat); 45138401 i B2 oo 3) System.out.printf("%09.2f", myFloat); 00004513 / Correct +45.13420 ndicates should output before a positive number, and 5 indicates 5 digits should follow the decimal pe I point. Correct 4513e+01 at values in scientific notation, print following the decimal point Correct imal point, and 2 e output wi fewer characters than the width. ers are printed: 6 digits before digits after the 0's when the Feedback?
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help