plz help!java programming(20p)

2014-01-10 7:21 am
Write a program which will demonstrate how to format output. To formatdata is topresent it in a certain way.The same data can be formattedin many ways, someof them easy forusers to understand, and some of them not.
This program should be an example ofhow Java lets you format numbers and
strings.First you will need to study Java's formatting facilities, and then write a
program which shows the contents of variables being printed with different widths,
precisions, andalignments. Your program should:
a) Print out the resultof dividing2400by 7,rounded off to 0,1, 2,and 3 decimalplaces.
b) Print out the result of dividing 2400 by 24.
c) Show how wecan left-justify acolumn of several rows of names, and then how we can right justify them.

回答 (1)

2014-01-10 9:12 pm
✔ 最佳答案
No one is going to do you homework for you!


收錄日期: 2021-04-23 23:06:34
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20140109000051KK00244

檢視 Wayback Machine 備份