Use Eclipse for do this program. Show the output of the following statements.a) System.out.printf("amount is %f %e\n", 32.32, 32.32);b) System.out.printf("amount is %5.2f%% %5.4e\n", 32.327, 32.32);c) System.out.printf("rate (%.2f) in percent is %.2f%%\n", 0.2, 0.2 * 100);d) System.out.printf("%6b\n", (1 > 2));e) System.out.printf("%6s\n", "Java");f) System.out.printf("%-6b%s\n", (1 > 2), "Java");g) System.out.printf("%6b%-8s\n", (1 > 2), "Java");h) System.out.printf("%,5d %,6.1f\n", 312342, 315562.932);i) System.out.printf("%05d %06.1f\n", 32, 32.32);

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 22SA: What is the output of the following program? (6)...
icon
Related questions
icon
Concept explainers
Question

Use Eclipse for do this program.

Show the output of the following statements.
a) System.out.printf("amount is %f %e\n", 32.32, 32.32);
b) System.out.printf("amount is %5.2f%% %5.4e\n", 32.327, 32.32);
c) System.out.printf("rate (%.2f) in percent is %.2f%%\n", 0.2, 0.2 * 100);
d) System.out.printf("%6b\n", (1 > 2));
e) System.out.printf("%6s\n", "Java");
f) System.out.printf("%-6b%s\n", (1 > 2), "Java");
g) System.out.printf("%6b%-8s\n", (1 > 2), "Java");
h) System.out.printf("%,5d %,6.1f\n", 312342, 315562.932);
i) System.out.printf("%05d %06.1f\n", 32, 32.32);

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 10 steps with 8 images

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr