流输入/输出(c ++) [英] Stream input/out (c++)

查看:79
本文介绍了流输入/输出(c ++)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助解决这个基于流输入/输出的c ++问题..



编写一个程序,将0到212度的整数华氏温度转换为浮点数

摄氏温度,精度为3位数。使用公式

摄氏度= 5.0 / 9.0 *(华氏度 - 32);

来执行计算。输出应打印在两个右对齐的列中,并且

摄氏温度之前应该有正值和负值的符号......





我们将非常感谢您的帮助。

Could someone help solve this c++ problem which is based on stream input/output..

Write a program that converts integer Fahrenheit temperatures from 0 to 212 degrees to floatingpoint
Celsius temperatures with 3 digits of precision. Use the formula
celsius = 5.0 / 9.0 * ( fahrenheit - 32 );
to perform the calculation. The output should be printed in two right justified columns and the
Celsius temperatures should be preceded by a sign for both positive and negative values...


Your help will be greatly appreciated.

推荐答案

我们不做您的作业:这是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



亲自尝试,你可能会发现它不是你想的很难!
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!


阅读文档怎么样( showpos [ ^ ],setprecision [ ^ ])?
What about reading the documentation (showpos[^], setprecision[^])?


这篇关于流输入/输出(c ++)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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