Answer:
UTF-8 and ASCII both are the character encoding.
In a system,every character has some binary representation,these are the method to encode them.Earlier only ASCII was there, for every character it uses 8 bits to represent.In ASCII only 8 bytes were there i.e 2^8 that is 256.We can't represent number beyond than 127 so it generate a need for other encoding to get into,these drawbacks lead to Unicode,UTF-8.
As ASCII codes only uses a single byte,UTF-8 uses upto 6 bytes to represent the characters.So we can save characters which are as long as 2^48 characters. We can read this encoding easily by the help of shift operators and it is also independent of byte order.
As messages on internet were transferred over 7 bit ASCII messages,so many mail servers removed this encoding.
Class C. <span>Class C </span>fires<span> are contained using Carbon Dioxide (CO2) </span>fire extinguishers<span> and Dry Chemical </span>fire extinguishers<span>. Sensitive electrical sources or electrical equipment such as </span>computers<span>, T.V's, or wireless devices affected by </span>fire<span> may have residue left once the </span>fire<span> has been deterred.</span>
Answer:
- import java.util.Scanner;
-
- public class Main {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- System.out.print("Input total sales of month: ");
- double totalSales = input.nextDouble();
-
- double stateTax = totalSales * 0.04;
- double countyTax = totalSales * 0.02;
- double totalSalesTax = stateTax + countyTax;
-
- System.out.println("County Tax: $" + countyTax);
- System.out.println("State Tax: $" + stateTax);
- System.out.println("Total Sales Tax: $" + totalSalesTax);
- }
- }
Explanation:
Firstly, create a Scanner object and prompt user to input total sales of month (Line 5-7). Next, apply the appropriate tax rate to calculate the state tax, county tax (Line 9 - 10). Total up the state tax and county tax to get the total sales tax (Line 11).
At last, print the county tax, state tax and the total sales tax (Line 13 - 15).