2014软件技术二班
作者;B28
日期;2014,10.17
问题描述:创建一个程序吧摄氏度转换成华氏温度,该程序提醒用户输入摄氏度数据,然后显示出装换后的华氏温度值
输入描述:一个实数,代表摄氏温度
输出描述:一个实数,代表华氏摄氏温度
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
double c, f;//c=摄氏度 f=华氏摄氏度
Console.WriteLine("请输入摄氏温度值");
c = Convert.ToDouble(Console.ReadLine());//输入数据
f = c * 9 / 5 + 32;
Console.WriteLine("{0}摄氏温度值对应{1}华氏温度", c, f);
Console.Read();
}
private static IFormatProvider ReadLine()
{
throw new NotImplementedException();
}
}
}
<img src="https://img-blog.csdn.net/20141017174651831?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZGVnNzg5/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />
总结:做事要有耐心