ex_275.cpp

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

CPP
24
字号
// Ex_275.cpp : Defines the entry point for the console application.
//

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

double lgtou(double n);


int main(int argc, char* argv[])
{
	double lg;
	cout<<"Enter the number of light years:";
	cin>>lg;
	cout<<lg<<" light years are "<<lgtou(lg)<<" astronomical units.\n";
	return 0;
}

double lgtou(double n)
{
	return 63240*n;
}

⌨️ 快捷键说明

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