1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
adell [148]
3 years ago
11

Please answer in Java

Computers and Technology
1 answer:
ra1l [238]3 years ago
8 0

Answer:

Scanner keyboard = new Scanner(System.in);

   

       

       

        double discount = 0;

        double productPrice;

        double subTotal;

        double salesTax;

        double saleTotal;

       

       

       System.out.printf("Enter the purchase amount:");

       productPrice = keyboard.nextDouble();

       

       if (productPrice > 10) {

          discount = 10;

}

       System.out.println( + discount + "% discount applied.");

       

       subTotal = (productPrice);

       salesTax = (subTotal * 0.14);

       saleTotal = (subTotal + salesTax - discount );

       System.out.printf("Subtotal: $%5.2f\n", subTotal);

       System.out.printf("Discount; -$%5.2f\n", productPrice - discount);

       System.out.printf("HST: $%5.2f\n", salesTax);

       System.out.printf("Total: $%5.2f\n", saleTotal + salesTax);

}

}

Explanation:

You might be interested in
Define operating system?explain the types of operating system on the basis of use.​
GalinKa [24]

Answer:

An operating system is a software that helps the any computers basic needs or functions.  For example, the windows on a computer is a operating system.

Explanation:

4 0
2 years ago
Byte pair encoding is a data encoding technique. The encoding algorithm looks for pairs of characters that appear in the string
nika2105 [10]

Answer:

The encoding algorithm looks for pairs of characters that appear in the string more than once and replaces each instance of that pair with a corresponding character that does not appear in the string. ... Byte pair encoding is an example of a lossy transformation because it discards some of the data in the original string.

Explanation:

hope it helps!!

6 0
3 years ago
Unwanted emails are called:malware,phishing, spam or virus
Colt1911 [192]
1. Spam
2. Phishing
3. True
3 0
3 years ago
PLEASE HELP ASAP (answer is needed in Java) 70 POINTS
8_murik_8 [283]

import java.util.Scanner;

public class MyClass1 {

   public static void main(String args[]) {

     Scanner scan = new Scanner(System.in);

     int smallest = 0, largest = 0, num, count = 0;

     while (true){

         System.out.println("Enter a number (-1 to quit): ");

         num = scan.nextInt();

         if (num == -1){

             System.exit(0);

         }

         else if (num < 0){

             System.out.println("Please enter a positive number!");

         }

         else{

             if (num > largest){

                 largest = num;

                 

             }

             if (num < smallest || count == 0){

                 smallest = num;

                 count++;

             }

             System.out.println("Smallest # so far: "+smallest);

             System.out.println("Largest # so far: "+largest);

         }

     }

   }

}

I hope this helps! If you have any other questions, I'll do my best to answer them.

6 0
3 years ago
Given the code that reads a list of integers, complete the number_guess() function, which should choose a random number between
Cerrena [4.2K]

Answer:

see explaination

Explanation:

import random

def number_guess(num):

n = random.randint(1, 100)

if num < n:

print(num, "is too low. Random number was " + str(n) + ".")

elif num > n:

print(num, "is too high. Random number was " + str(n) + ".")

else:

print(num, "is correct!")

if __name__ == '__main__':

# Use the seed 900 to get the same pseudo random numbers every time

random.seed(900)

# Convert the string tokens into integers

user_input = input()

tokens = user_input.split()

for token in tokens:

num = int(token)

number_guess(num)

5 0
4 years ago
Other questions:
  • Write a program that asks for 'name' from the user and then asks for a number and stores the two in a dictionary (called 'the_di
    9·1 answer
  • Which javascript method should you use if you want to specify a message string to appear on your web page as it loads?
    13·1 answer
  • What is an optical storage device?
    7·2 answers
  • Does anyone know this page for drivers ed?
    9·1 answer
  • write a script that creates and calls a stored procedure named insert_category. first, code a statement that creates a procedure
    10·1 answer
  • The Harrison Group Life Insurance company computes annual policy premiums based on the age the customer turns in the current cal
    5·1 answer
  • Design a class named Person and its two subclasses named Student and Employee. Make Faculty and Staff subclasses of Employee. A
    13·1 answer
  • Who plays oblox .............................
    8·2 answers
  • What is bigger that terbites
    10·2 answers
  • How to print<br> 1<br> 321<br> 54321<br> 7654321<br> triangle pattern in python
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!