
New Here ...Nid
Question:
To make a profit, a local store marks up the prices of its items by a certain percentage. Write a Java program that reads the original price of the item sold, the percentage of the markedup price, and the sales tax rate. The program then outputs the original price of the item, the markedup percentage of the item, the store’s selling price of the item, the sales tax rate, the sales tax, and the final price of the item. (The final price of the item is the selling price plus the sales tax).
how i add in the formula:=(::=(::
Here is My Code:
import java.util.*;
public class Main {
public Main() {
}
public static Scanner inFile=new Scanner(System.in);
public static void main(String[] args) {
double orginal_price;
double final_price;
double item_sold;
double marked_up_price;
double percentage;
double sales_tax;
System.out.println("Enter orginal price: ");
orginal_price = inFile.nextDouble();
System.out.println("Enter item sold: ");
item_sold = inFile.nextDouble();
System.out.println("Enter marked up price: ");
marked_up_price = inFile.nextDouble();
System.out.println("Enter percentage: ");
percentage= inFile.nextDouble();
System.out.println("Enter sale tax: ");
sales_tax = inFile.nextDouble();
System.out.println("Enter final price: ");
final_price = inFile.nextDouble();
System.out.println ("Enter The original price of the item:"+orginal_price);
System.out.println ("Marked up percentage of the item:"+marked_up_price);
System.out.println ("The selling price:="+percentage);
System.out.println ("Sales Tax Rate: "+sales_tax);
System.out.println ("The Final price:"+ final_price);
inFile.close();
}
}

Quote:
how i add in the formula
Do you have the formula that needs to be added?
What values does it need to have to compute the value you want?
Please edit your code and wrap it in code tags to preserve the formatting. Use the # icon above the input box.