This file contains hidden or 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
| import java.util.Scanner; | |
| public class Cubes | |
| { | |
| public static void main(String[] args) | |
| { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| int cube1, cube2; | |
| double sum; |
This file contains hidden or 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
| import java.util.*; | |
| public class Phone | |
| { | |
| public static void main(String[] args) | |
| { | |
| // Declare variables | |
| int areaCode = 0; | |
| int sequence1 = 0, sequence2 = 0; | |
| String number = ""; |
This file contains hidden or 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
| import java.util.*; | |
| public class Distance { | |
| public static void main(String[] args) { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| int x1, x2, y1, y2; | |
This file contains hidden or 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
| import java.util.*; | |
| public class Usernames { | |
| public static void main(String[] args) { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| String first, last, username; | |
This file contains hidden or 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
| import java.util.Scanner; | |
| import java.text.*; | |
| public class Sphere | |
| { | |
| public static void main(String[] args) | |
| { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| final double PI = Math.PI; |
This file contains hidden or 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
| import java.util.Scanner; | |
| import java.text.*; | |
| public class Tax { | |
| public static void main(String[] args) | |
| { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| final double TAX_RATE = 0.2; |
This file contains hidden or 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
| import java.util.Scanner; | |
| import java.text.*; | |
| public class Payroll { | |
| public static void main(String[] args) | |
| { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| double wage = 0.0, hours = 0.0; |
This file contains hidden or 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 Count { | |
| public static void main(String[] args) | |
| { | |
| // Declare variables | |
| int i = 0; | |
| int index = 0; | |
| while (i != 100) | |
| { |
This file contains hidden or 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 Root { | |
| public static void main(String[] args) | |
| { | |
| // Declare base as an integer with a value of 30 | |
| int base = 30; | |
| while (base != 0) { | |
This file contains hidden or 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
| import java.util.*; | |
| public class Factorial { | |
| public static void main(String[] args) | |
| { | |
| // Declare variables | |
| Scanner sc = new Scanner(System.in); | |
| int n = 0, total = 1; |