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
//Programmer: Kien Doan | |
//Course: CS111A | |
//Instructor: Abbas Moghtanei | |
//Date: 10/25/2012 | |
//Objective: Extra Credit Homework 1 | |
public class Box | |
{ | |
private int height; | |
private int width; |
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.io.*; | |
import java.util.*; | |
public class Kopy | |
{ | |
public static void die(String str) | |
{ | |
System.err.println(str); | |
System.exit(1); | |
} | |
public static void main(String args []) throws FileNotFoundException |
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 SocialSecurity | |
{ | |
public static void main (String args []) | |
{ | |
String ssnum; | |
int cfix = 0; | |
Scanner sc = new Scanner(System.in); | |
for (;;) |
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 SocialSecurity | |
{ | |
public static void main (String args []) | |
{ | |
String ssnum; | |
Scanner sc = new Scanner(System.in); | |
for (;;) | |
{ |
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 SocialSecurity | |
{ | |
public static void main (String args []) | |
{ | |
String ssnum; | |
Scanner sc = new Scanner(System.in); | |
for (;;) | |
{ | |
System.out.print( "Please enter your Social Security number: Enter Quit or Stop to exit "); |
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 Test | |
{ | |
public static void main(String args[]) { | |
String ssnum; | |
Scanner sc = new Scanner(System.in); | |
while (true) | |
{ |
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 Test | |
{ | |
public static void main (String args []) | |
{ | |
String ssnum; | |
Scanner sc = new Scanner(System.in); | |
while(true) | |
{ |
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 static void main (String args []) | |
{ | |
String ssnum; | |
Scanner sc = new Scanner(System.in); | |
while(true) | |
{ | |
System.out.print("Please enter your Social Security number, type quit or stop to exit "); | |
ssnum = sc.nextLine(); | |
if (ssnum.equalsIgnoreCase("quit") || ssnum.equalsIgnoreCase("stop")) break; |
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 static void main (String args []) | |
{ | |
int quarters = 0; | |
int dimes = 0; | |
int nickels =0; | |
int pennies = 0; | |
int num; | |
Scanner sc = new Scanner(System.in); | |
while (true) | |
{System.out.print ("Give me some pennies, press 0 to stop: "); |
NewerOlder