Facebook Sharer
选择您要替换的背景颜色:
【农历新年】背景图片:
个性化设定
 注册  找回密码
查看: 1725|回复: 0
打印 上一主题 下一主题

nid professional programmer some help......thx alot .....

[复制链接]

1

主题

0

好友

-1

积分

负积分-能发言

跳转到指定楼层
1#
发表于 2011-8-3 09:39 AM |只看该作者 |倒序浏览
本帖最后由 Alex8889 于 2011-8-3 11:38 AM 编辑

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();

    }
   
}




已有 1 人评分积分 收起 理由
goodday -2 警告:这是中文论坛,请用中文回复,或使用 ...

总评分: 积分 -2   查看全部评分

收藏收藏0
您需要登录后才可以回帖 登录 | 注册

JBTALKS.CC |联系我们 |隐私政策 |Share

GMT+8, 2024-12-26 02:03 AM , Processed in 0.097391 second(s), 29 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

Ultra High-performance Dedicated Server powered by iCore Technology Sdn. Bhd.
Domain Registration | Web Hosting | Email Hosting | Forum Hosting | ECShop Hosting | Dedicated Server | Colocation Services
本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved
合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部