ex_274.cpp

来自「本代码给出了C++经典教程《C++ Primer Plus》第二章的课后编程练习」· C++ 代码 · 共 25 行

CPP
25
字号
// Ex_274.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
using namespace std;

int CToF(double degree);


int main(int argc, char* argv[])
{
	cout<<"Please enter a Celsius value:";
	double Celsius;
	cin>>Celsius;
	int Fah=CToF(Celsius);
	cout<<Celsius<<" degree Celsius is "<<Fah<<" degree Fahrenheit."<<endl;
	return 0;
}

int CToF(double degree)
{
      return 1.8*degree+32.0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?