方法和行为 [英] methods and behaviours

查看:104
本文介绍了方法和行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编写一个C#控制台程序,该程序将计算产品的零售价.编写并使用以下方法:
提示并获取产品名称,产品成本价和要增加利润的折扣百分比的方法.
在成本中增加了利润后计算零售价的方法.
显示输出的方法.应显示以下内容:
产品名称;
产品原价;
利润百分比;
新零售价;

Write a C# console program that will calculate the retail price of a product.Write and use the following methods:
.A method to prompt and get the product name,the product cost price and the discount percentage to be added for profit.
.A method to calculate the retail price after the percntage profit has been added to the cost price.
.A method to display the output.the following should be displayed :
the product name;
the original cost price of the product;
the profit percentage;
the new retail price;

推荐答案

您是否已阅读问问题"部分中提到的指南?
Did you read the guidelines that are mentioned in the "Ask a Question" section?
A few simple rules when posting your question.

    Have you searched or Googled for a solution?
    Be specific! Don''t ask "I need to write a booking application". Specify exactly what it is you need help with.
    Keep the subject brief but descriptive. eg "How do I change the dialog colour?"
    Keep the question as concise as possible. If you have to include code, include the smallest snippet of code you can - do not dump your entire codebase.
    Tag your question appropriately.
    Your question may be edited or retagged by others. Anything inappropriate will be removed.
    If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
    Be courteous and DON''T SHOUT. Everyone here helps because they enjoy helping others, not because it''s their job.
    Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read.
    Do not be abusive, offensive, inappropriate,harass anyone on the boards or post ads or spam. Doing so will get you kicked off and banned. Play nice.


有关询问有效问题的更多说明:

代码项目常见问题解答 [如何使用Google和其他查找编程的技巧帮助 [ ^ ]
在论坛中发布问题的一些准则 [ ^ ].

另请参阅此讨论:
如何问一个好问题? [
Some more instructions on asking a valid question:

Code Project Questions and Answers FAQ[^]
How to Use Google and Other Tips for Finding Programming Help[^]
Some guidelines for posting questions in the forums[^].

See also this discussion:
How to ask a good question?[^].

—SA


请花点力气,问一下您遇到的问题.假设别人会做你的功课是很不礼貌的.祝你好运.
Please put in some effort and ask questions that you are stuck on it. It is rude to assume others will do your homework. Goodluck.


这篇关于方法和行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆