cpp_primer_plus/ch02/06.cpp
2022-08-23 23:01:08 +01:00

11 lines
282 B
C++

# include <iostream>
using namespace std;
int main(){
double ly_value, au_value;
cout << "Enter the number of light years: ";
cin >> ly_value;
au_value = int(63240 * ly_value);
cout << ly_value << " light years = " << au_value << " astronomical unites" << endl;
return 0;
}