All pastes #1760434 Raw Edit

Unnamed

public text v1 · immutable
#1760434 ·published 2010-01-21 17:51 UTC
rendered paste body
int timeInterval = hours * 3600 + minutes * 60 + seconds;
System.out.println("The equivalent time interval in seconds is: "+timeInterval+" seconds.");

final double NICKEL_VALUE = 5.0;
final double DIME_VALUE = 10.0;
final double QUARTER_VALUE = 25.0;
double payment = nickels * NICKEL_VALUE + dimes * DIME_VALUE + quarters * QUARTER_VALUE;
int dollar = Integer.parseInt(payment)/100;
int cent = Integer.parseInt(payment) % 100;
System.out.println(dollar+" dollars and "+cent+" cents.");

Scanner in = new Scanner(System.in);
System.out.print{"Enter quantity: ")
int quantity = in.nextInt();
System.out.print("Enter price: ");
double price = in.nextDouble();
System.out.print("Enter city: ");
String city - in.nextLine();
System.out.print("Enter state code: ");
String state = in.next();