- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Write a java program to repeatedly get two numbers from the user and display the sum of their squares. User numbers and result are real numbers. Repeat this interactive input/output until the first number exactly matches the sentinel value 990. Do not process the input matching the sentinel value. For … |
|
[LIST=1] [CODE] System.out.print("Enter the letter(t or z): "); B]letter = keyboard.next();[/B] if (letter == 't'||letter == 'T') { System.out.println("True"); } else if (letter == 'z'|| letter == 'Z') { System.out.println("False"); } [/CODE] Im getting an error here in bold, what is the problem?? |
|
[CODE]import java.util.*; public class DiscountBolts { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); double bolts, nuts, washers; double total; System.out.println("Enter number of bolts: "); bolts = keyboard.nextDouble(); System.out.println("Enter number of nuts: "); nuts = keyboard.nextDouble(); System.out.println("Enter number of washers: "); washers = keyboard.nextDouble(); total = (bolts … |
|
Hey guys, I'm trying to create a program that has three items and adds the cost of the three items and prints the final total with sales tax. I need a subtotal, sales tax, and total amount. I'm having a problem getting the program to calculate the quantity correctly and … |