Results 1 to 2 of 2

Thread: New Here ...Nid

  1. #1
    alex8889 is offline Member
    Join Date
    Aug 2011
    Posts
    1
    Rep Power
    0

    Post 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 marked-up price, and the sales tax rate. The program then outputs the original price of the item, the marked-up 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();

    }

    }

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •