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 Sphere | |
{ | |
public static void main(String[] args) | |
{ | |
// Declare variables | |
Scanner sc = new Scanner(System.in); | |
final double PI = Math.PI; |
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 Usernames { | |
public static void main(String[] args) { | |
// Declare variables | |
Scanner sc = new Scanner(System.in); | |
String first, last, username; | |
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 Distance { | |
public static void main(String[] args) { | |
// Declare variables | |
Scanner sc = new Scanner(System.in); | |
int x1, x2, y1, y2; | |
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 Phone | |
{ | |
public static void main(String[] args) | |
{ | |
// Declare variables | |
int areaCode = 0; | |
int sequence1 = 0, sequence2 = 0; | |
String number = ""; |
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 Cubes | |
{ | |
public static void main(String[] args) | |
{ | |
// Declare variables | |
Scanner sc = new Scanner(System.in); | |
int cube1, cube2; | |
double sum; |
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 Lottery | |
{ | |
public static void main (String[] args) | |
{ | |
// Create an ArrayList of integers to store the 6 random numbers | |
ArrayList<Integer> numbers = getLotteryNumbers(); | |
// Print the results |
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 Dice | |
{ | |
public static void main (String[] args) | |
{ | |
// Call the roll method | |
rollDice(); | |
} | |
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 Replace { | |
public static void main(String[] args) { | |
// Declare variables | |
Scanner sc = new Scanner(System.in); | |
String word = "", newWord = ""; | |
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
# shellcast | |
# Main application file | |
import sources | |
import pywapi | |
import string | |
def main(): | |
print("Welcome to shellcast.\n\nNote: If your zipcode begins with a 0, type the zipcode without the zero.\n") |
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; | |
class Hello { | |
public static void main(String[] args) { | |
// Declare variables | |
Scanner sc = new Scanner(System.in); | |
final int QUARTER = 25; | |
final int DIME = 10; |