Created
September 20, 2019 01:29
-
-
Save gitaficionado/7bbab7dc4da5631a7310e99f86cc3bae to your computer and use it in GitHub Desktop.
(Print a table) Write a program that displays the following table. Cast floating-point numbers into integers. See page 68 for more information.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PrintTableWithCasting_02_18 { | |
// Main method | |
public static void main(String[] args) { | |
System.out.println("a b _____(a, b)"); | |
System.out.println("1 2 " + (___)____.___(1, 2)); | |
System.out.println("2 3 " + (___)____.___(2, 3)); | |
System.out.println("3 4 " + (__)___.___(3, 4)); | |
System.out.println("4 5 " + (___)___.__(4, 5)); | |
System.out.println("5 6 " + (___)____.___(5, 6)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment