Answer to Question #274946 in Java | JSP | JSF for Arnold

Question #274946

Write a java program that initialize tge diplays values based on the table below. Print all the numbers as whole numbers. Name the class DisplayWholeNumbers.java





"Variable Name"




examScore




averageGrade




seconds_per_minute




length




referenceNumber






"Value"




87




84.67




60




29.7




998883723193101

1
Expert's answer
2021-12-03T00:37:25-0500
public class DisplayWholeNumbers {
    public static void main(String[] args) {
        double examScore = 87;
        double averageGrade = 84.67;
        int seconds_per_minute = 60;
        double length = 29.7;
        long referenceNumber = 998883723193101L;

        System.out.printf("examScore %.0f\n" ,  examScore);
        System.out.printf("averageGrade %.0f\n" ,  averageGrade);
        System.out.printf("seconds_per_minute %d\n" ,  seconds_per_minute);
        System.out.printf("length %.0f\n" ,  length);
        System.out.printf("referenceNumber %d\n" ,  referenceNumber);

    }
}

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