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
import java.util.*; | |
import java.text.*; | |
public class Tax { | |
public static void main(String[] args) { | |
// Declare double values to be used in the program | |
double income = 0; | |
String taxRate = ""; |
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
import java.util.Scanner; | |
public class Bottles | |
{ | |
public static void main(String[] args) | |
{ | |
// Declare variables | |
Scanner sc = new Scanner(System.in); | |
int verses = 0; | |
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
import java.util.Scanner; | |
public class Numbers | |
{ | |
public static void main(String[] args) | |
{ | |
// Declare variables | |
Scanner sc = new Scanner(System.in); | |
int evens = 0, odds = 0, zeros = 0; | |
int number = 0; |
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
import java.util.Scanner; | |
public class Leap { | |
public static void main(String[] args) { | |
// Call menu method | |
menu(); | |
} | |
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
import java.util.Scanner; | |
public class Prime { | |
public static void main(String[] args) { | |
// Declare a new Scanner object and an integer | |
Scanner sc = new Scanner(System.in); | |
int n = 0; | |
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
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; |
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 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 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 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 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; |