当前位置: > 英语翻译...
题目
英语翻译
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.

提问时间:2020-12-12

答案
写一个让用户可以对两个度量单位进行转换的程序.用户可以输入数量,两种度量单位的名称,比如盎司,克,用户就可以据以算出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的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.