Answer to Question #239002 in Java | JSP | JSF for Woyengimiesindo Ma

Question #239002
Write a program that displays the following two tables side by side (note that 1 ping = 3.305 square meters):
Ping
Square meter
|
Square meter
Ping
10
33.050
|
30
9.077
15
49.575
|
35
10.590
...
75
247.875
|
95
28.744
80
264.400
|
100
30.257
1
Expert's answer
2021-09-22T00:02:11-0400
public class Main
{
	public static void main(String[] args) {
		System.out.println("Ping\t Square meter \t| Ping\t Square meter");
	    double ping = 3.305;
	    for (int i = 0; i < 15; i++) {
	        double a = 5.0 * (i + 2);
	        System.out.printf("% 3.0f\t % 3.3f\t| ", a, a * ping);
	        double b = 5.0 * (i + 6);
	        System.out.printf("% 3.0f\t % 3.3f\n", b, b * ping);
	    }
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS