Answer:
It has to be more specific and easier to understand because of its importance.
Explanation:
Answer:
purchase_amount = float(input("Enter the amount of a purchase: "))
state_sales_tax = purchase_amount * 0.05
country_sales_tax = purchase_amount * 0.025
print("The amount of the purchase is " + str(purchase_amount))
print("The state sales tax is " + str(state_sales_tax))
print("The county sales tax is " + str(country_sales_tax))
print("The total sales tax is " + str(state_sales_tax + country_sales_tax))
print("The total of the sale is " + str(purchase_amount + state_sales_tax + country_sales_tax))
Explanation:
*The code is in Python.
Ask the user to enter purchase amount
Calculate the state sales tax, multiply purchase amount by 0.05
Calculate the county sales tax, multiply purchase amount by 0.025
Calculate the total sales tax, sum the state sales tax and county sales tax
Print the amount of the purchase, state sales tax, county sales tax, total sales tax and total of the sale
Answer:
import java.util.*;
public class MyClass {
public static void main(String args[]) {
Scanner input = new Scanner(System.in);
System.out.print("Input a word: ");
String userinput = input.nextLine();
for(int i =0;i<userinput.length();i+=2) {
System.out.print(userinput.charAt(i));
}
}
}
Explanation:
This line prompts user for input
System.out.print("Input a word: ");
This declares a string variable named userinput and also gets input from the user
String userinput = input.nextLine();
The following iterates through every other character of userinput from the first using iteration variable i and i is incremented by 2
for(int i =0;i<userinput.length();i+=2) {
This prints characters at i-th position
System.out.print(userinput.charAt(i));
<span>slide layout you should change the slide layout hope this helps ................</span>