|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I Have to write a java program for a local store which try to make a profit by marks up the prices of items by a certain percentages. The program which reads the orginial price of the item sold, the percentage of amrked up price, sales tax rate. The program then outputs the orginial price of the item. The marked up percentage of the item, the store selling price of the item. The sale tax rate, the sale tax, and the final price of the item ( the final price of the item is the selling price plus sales tax.
So far I have the following: import java.util.*; public class project1 { original_price = console.nextdouble(); public static void main ( String [] args) { //declares variables double orginal_price; double item_sold; double marked_up_price; double percentage; double sales_tax; final final_price System.out.print ("Enter orginal price: "); System.out.flush(); oringal price = console.nextInt(); System.out.println(); System.out.print("Enter item sold: "); System.out.flush(); item_sold = console.nextInt(); System.out.println(); Sytem.out.print("Enter marked up price: "); System.out.flush(); marked_up_price = console.nextInt(); System.out.println(); System.out.print("Enter percentage: "); System.out.flush(); percentage= console.nextInt(); System.out.println(); Sytem.out.print("Enter sale tax: "); System.out.flush(); sale_tax = console.nextInt(); System.out.println(); System.out.print("Enter final price: "); System.out.flush(); final_price = console.nextInt(); System.out.println(); System.out.println(); System.out.println ("Enter The original price of the item"); System.out.println(); System.out.println ("Marked up percentage of the item"); System.out.println(); System.out.println ("The selling price=$ + selling price"); System.out.println(); System.out.println ("Sales Tax Rate = sales tax"); System.out.println(); System.out.println ("The Final price"); System.out.println(); System.out.println ("The Final price of item + selling price + sales tax$"); } } now I'm down to 2 errors,but I'm not sure on calculations ![]() Last edited by moeski301 : September 28th, 2006 at 04:46 PM. Reason: additional information/made so more changes |
|
#2
|
||||
|
||||
|
please surround your code with [ CODE ] tags
colton22 |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > Help with Java program |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|