英语翻译
题目
英语翻译
write a program to allow a user to do conversions between two different units of measurement.So the user might type in an amount,and the naems of two units of measurement,for example:5,ounce,gram
In this case the program should then print out the number of grams equal to 5 ounces,thus:5 ounces is 140 grams (1 ounce is 28 grams)
The unit names and conversion factors will be supplied as a file convert.txt,and this should be read in by the program at start-up.The file consists of a series of lines,each consisting of two unit names(both strings) and a conversion factor (a number with a decimal point) seqarated by commas,for example:ounce,gram,28.0
This means that one ounce equals 28.0 grams.A sample file is available on the portal,but your program should be able to cope with any file laid out in this way.There is code in section A of the " LinkedList" project to read from such as file; you need" using System.IO;" at the start of the program.
答案
写一个让用户可以对两个度量单位进行转换的程序.用户可以输入数量,两种度量单位的名称,比如盎司,克,用户就可以据以算出5盎司是多少克,1盎司是28克那么5盎司是140克.单位名称及计算方式会在一个TXT格式的转换文件中提供,程序开始时要进行读入.文件中,每一行包括两个单位名称和一个十进位的计算方式,分别用逗号隔开,例如:盎司,克,28.0,即表示,每盎司等于28.0克.门户网站已有一个样本文件,但你设计的程序应兼容所有符合这种方式的文件.在链接单(linkedlist)的section A部分有这样的文件,请在程序开始时设定系统using system .IO.
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
最新试题
热门考点
- 不经一番寒彻骨,怎得梅花扑鼻香 滴水能把石穿透,万事功到自然成.这两句的共同点是什么
- 如何用兆欧表测量静电接地电阻
- 图书室有科技书320本,比文艺书多3/5.文艺书有多少本?
- 已知分式(x-4/x-2-x-2)/x的平方-2x+1/x-2,先化简,再选择一个你喜欢的值代入.
- 如图,在三角形中,BP,CP分别是三角形ABC的外角
- 直线一般方程怎么表示垂直和平行呢
- 抢救溺水者进行口对口人工呼吸时,每分钟呼吸次数约为?
- ∫(sinθ)^4 dθ 的不定积分怎么求?
- 在35度的空气中与35度的水中哪个更热一些啊,能写理由吗,
- 声音在空气中以340m/s的速度传播,光以3×10的八次方的速度传播.