I need to write a program called Table.Java that takes a command-line argument N and prints a table of N rows with a header as shown in the example below. for example, if I enter "Java Table 10" It should print 10 rows with  "i     hex     i*i      i*i*i        log      pcnt"    of that number

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

I need to write a program called Table.Java that takes a command-line argument N and prints a table of N rows with a header as shown in the example below. for example, if I enter "Java Table 10" It should print 10 rows with 

"i     hex     i*i      i*i*i        log      pcnt"    of that number

the output is:
i hex
1 Оx0001
i*i
i*i*i
log
0.000
pcnt
10%
1
1
2 0х0002
4
8
2.000
20%
3 Ох0003
4 Ох0004
3.170
30%
16
64
4.000
40%
5 Ох0005
25
125
4.644
50%
6 Ох0006
7 Ох0007
8 0х0008
216
343
60%
70%
36
5.170
49
5.615
64
512
6.000
80%
9 0x0009
81
729
6.340
90%
10 0×000A
100
1,000
6.644
100%
1234567 123456 123456789 123456789 123456789 12345678
The last line is just to help convey the column widths.
NO N
Transcribed Image Text:the output is: i hex 1 Оx0001 i*i i*i*i log 0.000 pcnt 10% 1 1 2 0х0002 4 8 2.000 20% 3 Ох0003 4 Ох0004 3.170 30% 16 64 4.000 40% 5 Ох0005 25 125 4.644 50% 6 Ох0006 7 Ох0007 8 0х0008 216 343 60% 70% 36 5.170 49 5.615 64 512 6.000 80% 9 0x0009 81 729 6.340 90% 10 0×000A 100 1,000 6.644 100% 1234567 123456 123456789 123456789 123456789 12345678 The last line is just to help convey the column widths. NO N
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY